Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.