Form submit after validation without java
Posted: Fri Nov 24, 2006 8:30 pm
Ok I have a form, (form.php) and uppon submit
The PHP validation works nice
, but now what... I would like it to go to a confirmation page that shows the user what they entered and askes them to confirm it. If anaything is wrong they can use there back button to edit it and the form willbe validated again and the user shown the confirm page again. If everything is ok they hit the continue button on the confirm page a o to paypal.
this is what I have if the vallidatation passes:
I have fornd a few ways to do it with java, but I dont want to use java...
I did try:
But that did not validate the form the secount time the user edited it 
Code: Select all
<form name="reg" method="post" action="form.php">this is what I have if the vallidatation passes:
Code: Select all
// display error message if any, if not, proceed to other processing
if($error_msg==''){
// other process here
} else {
echo "<p class=\"important\">$error_msg</p>";
}I did try:
Code: Select all
// display error message if any, if not, proceed to other processing
if($error_msg==''){
// other process here
$vallpass = 'yes'; // if form passes vallidation
} else {
echo "<p class=\"important\">$error_msg</p>";
}
if ( "$vallpass" == 'yes'){
$action = 'confirm.php'
} else {
$action = 'form.php'
}Code: Select all
<form name="reg" method="post" action="<?php echo "$action";?>">