Jump to content

sending info back to a form


NickG21

Recommended Posts

hey everyone i am currently using 6 individual forms in order to gather information from a user. all of the forms have different field names and submit button names. i am looking to use a seperate validation page to validate each one individually and if errors occur to reload the page and keep the correct info displayed. I am able to keep the correct information displayed but i do not know how to make my code have the same page reload. below is my logic of these forms. hope someone can help me out a little
thank you

[code]
<?php session_start();
header("Cache-control: private");
foreach($_POST as $key => $var)
{ $_SESSION[$key] = $var; } ?>

<?php IF (!isset($_POST['step'])) {
include "ListInfo.php";
include "validation.php";} <-- want to include in every page possibly?
ELSEIF ($_POST['step'] == 2){
include "OptServices.php";}
ELSEIF ($_POST['step'] == 3){
include "ContInfo.php";}
ELSEIF ($_POST['step'] == 4){
include "BillInfo.php";}
ELSEIF ($_POST['step'] == 5){
include "Survey.php";}
ELSEIF ($_POST['step'] == 6){
include "Terms.php";} ?>
[/code]

and here is some of the validation.php:

[code]
if(empty($SendAddr)){
$error[] = "";
$SendAddr="";
}
if(count($error) > 0){
echo "Please Correct Your Errors Before Proceeding";
}ELSE{ include_once("HeaderImage.php");
}
[/code]
everything is declared properly above and the validation is all correct this is just where i think i would need to execute the code to return me properly to headerImage.php with the page included depending upon the 'step'? hope this isn't too confusing
Link to comment
https://forums.phpfreaks.com/topic/33371-sending-info-back-to-a-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.