dissonantallure
08-06-2009, 01:29 AM
Okay I have finally figured out how to pass variables across multiple pages by using the following code.
<?php
foreach ($_POST as $key => $val) {
echo '<input type="hidden" name="' . $key . '" value="' . $val . '" />' . "\r\n";
}
?>
Now I am stuck on how to validate each field without using any JavaScript. I usually use:
<form action="<?php $_SERVER['PHP_SELF'] ?>" />
However, I cannot use that code and pass variables to the next page. Can anyone please help me successfully validate and pass form fields across several pages?
<?php
foreach ($_POST as $key => $val) {
echo '<input type="hidden" name="' . $key . '" value="' . $val . '" />' . "\r\n";
}
?>
Now I am stuck on how to validate each field without using any JavaScript. I usually use:
<form action="<?php $_SERVER['PHP_SELF'] ?>" />
However, I cannot use that code and pass variables to the next page. Can anyone please help me successfully validate and pass form fields across several pages?