I've got a PHP based form that once submitted goes to a seconday page where the validation and email submittion is completed. I'm trying to add the session capability so that if an error is discovered during the validation, it will re-direct back to the PHP form, indicate the specific error via a case and also re-add the submitter entries so they don't need to re-type the correct information...
On my PHP form page, I do have the session command as the first action within the body.
Code: Select all
<?php session_start(); ?>
Code: Select all
<?php
//************************************************
//PHP Cookie Information
session_start();
session_register ("name");
session_register ("email");
session_register ("business");
session_register ("acct");
session_register ("username");
$HTTP_SESSION_VARS ['name'] = $_POST["name"]
$HTTP_SESSION_VARS ['email'] = $_POST["email"]
$HTTP_SESSION_VARS ['business'] = $_POST["business"]
$HTTP_SESSION_VARS ['acct'] = $_POST["acct"]
$HTTP_SESSION_VARS ['username'] = $_POST["username"]
Code: Select all
if (empty($_POST["name"]) || empty($_POST["email"]) || empty($_POST["business"]))
{
// redirect back to form
header ("Location: ../form.php?error=info");
exit();
}