Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stupid Empty Rows!!!

Status
Not open for further replies.

juuso79

Programmer
Nov 15, 2001
22
FI
I have made a database- forum with PHP and MySQL.
My problem is this:

Every time when the page is reloaded it makes empty row in to my database table.
I think that the submit button makes it.
ex. every messages have a option that they can be deleted and then the page refresh with
header("Location: forum.php")-funktion. But when the page refresh there is now a new empty row.
How can I prevent that happening or maby delete those rows automaticly.
 
try this:


if($whatever data your collecting != "") {

put db query here....

}


 
logically this is the idea I have of how this should happen:
(page 1)contents and Post reply option -> (page 2)process data -> (page 1 again)return to page being viewed.

Use javascript to return the person back to where they were, this way you will never see the form submit page get refreshed more than once. ***************************************
Party on, dudes!
[cannon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top