
April 3rd, 2004
06:45 PM
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

April 3rd, 2004
11:49 PM
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
<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
..
Thanks
Halobreak
___________________
