Hi all,
I have a form that displays stuff from a database, for a user to edit. (user with admin status).
That form gets the data from a $_GET variable in the url, such as page.php?item=20
Now, that works ok, the problem comes from when I need to update the database.
The form submits to page.php, so I put:
if (isset($_POST['formsubmitted'])) {
// update database here
}
if (isset($_GET['item'])) {
//do stuff here
}
else {
// nothing!
}
The checking of the $_POST variable produces a blank page when its put into the page.
Even if i switch the statements around and make a big if and elseif statement, still nothing. If i take out the if statement about the formsubmitted and update database, then page displays fine.
How do I get this working and is there a better way of going about this?
Thanks.