Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

93 users online



Need help to carry on the form values to next page.

Need help to carry on the form values to next page.

Currently viewing this thread: 1 (0 members and 1 guests)


sathish

sathish

My name is Sathish from India.
Status: Offline!

Need help to carry on the form values to next page.

Hello,
Hhhm, I have a doubt in PHP. Well, its simple. What I exactly want to do is. Basically I want to store all my customers to a database. So, the first thing is that I have a form where I fill in all necessary information. And the next step is after the submit button is hit, I set the form action to a PHP file where I display the entered values. This is because, If I have entered any worng information, I can correct it beofre I store it to the database.

My question is, how do I store the values to the database? I know how to insert a row the table directly without confirming the user. Could some one explain me this.

Thanks,

Sathish

___________________

sathish

Halobreak

Halobreak

Neverside Newbie
Status: Offline!

Have a form file, and then a second file that combines both the correct information button and the view information thing..
like

PHP:


<html>
<head>
<title> Confirm your information </title>
</head>
<Body>
<center>
<?
if(isset($_POST['its_fine'])){
//store the crap in the db..
echo "Your information has been confirmed and stored in the database.";
}else{
if(isset(
$_POST['correct_it'])){
echo 
"You will be transfered to the previous page shortly.. <META HTTP-EQUIV=Refresh CONTENT='1; URL=register.php'>";

}
if(!
$_POST['its_fine'])){
echo 
"Your information is as follows:<br> Name: ".$name."<br> Password: ".$password." <br> E-Mail: ".$email."<br>Account-Type: ".$accnt_type."<br> If this information is incorrect, please press the 'It's fine' button, otherwise, press the 'Correct it' button to edit your displayed information.<br><br>";
}
?>

<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<input type="submit" name="its_fine" value="It's Fine." /><br>
<input type="submit" name="correct_it" value="Correct it." />
</form>
</center>
</body>
</html>

I have no clue if that works.. I just wrote it in a few minutes.. And I'm still learning php, so please correct me if im wrong Smile..

Thanks

Halobreak

___________________

http://s93844284.onlinehome.us/halo_vertigo.gif

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0069 seconds.