Submit form to database

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
suzair
Forum Newbie
Posts: 1
Joined: Sat Dec 13, 2008 10:41 am

Submit form to database

Post 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.
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: Submit form to database

Post by jaoudestudios »

What do you have so far?
cavemaneca
Forum Commoner
Posts: 59
Joined: Sat Dec 13, 2008 2:16 am

Re: Submit form to database

Post 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?
Post Reply