Page 1 of 1

Submit form to database

Posted: Sat Dec 13, 2008 11:04 am
by suzair
Hello,
I want to submit form to database and redirect it to same page but with a success
message on the same page? This is urgent can anyone help on it please.

Re: Submit form to database

Posted: Sat Dec 13, 2008 12:29 pm
by jaoudestudios
What do you have so far?

Re: Submit form to database

Posted: Sat Dec 13, 2008 2:25 pm
by cavemaneca
how bout something like

Code: Select all

if (!isset('submit') {
// show Form
?>
 
<?php
}
else {
// send to database
// show message 
}
then use <form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">

Something like that perhaps?