Update Form + Update Query in one file
Posted: Thu Jul 20, 2006 6:10 pm
Hi,
Can anyone help me with a problem?
The thing is : I want the query & the update form in the same file.
So when there's POST data the query will run and alter the records in my database, and then show the new results
So when there IS NO POST data the page will just show the update form.
Is this possible?
// I think the form action should be something like
But how do I tell the script only to update the records when there's POST data?
Otherwise it will empty the records when there's no data
Can anyone help me with a problem?
The thing is : I want the query & the update form in the same file.
So when there's POST data the query will run and alter the records in my database, and then show the new results
So when there IS NO POST data the page will just show the update form.
Is this possible?
// I think the form action should be something like
Code: Select all
action="<?php echo $_SERVER['PHP_SELF']?>"Otherwise it will empty the records when there's no data