A
Anonymous
Guest
The following script (process.php) is made to have a form POSTED to it and then if there are errors in the form, send it back to the form (form.php).
The problem occurring is that the form variables, which are stored in the sessions by process.php are not being accesible from on form.php. This same script works correctly on my test server (running Apache on windows xp home) but on the actual server that is running IIS it isn't working.
The problem occurring is that the form variables, which are stored in the sessions by process.php are not being accesible from on form.php. This same script works correctly on my test server (running Apache on windows xp home) but on the actual server that is running IIS it isn't working.
Code:
<?php
session_start();
include("d52er/includes/validator.class.php");
$fv = new FormValidator;
if (isset($_POST['Submit']) && @$fv->isEmail('Email', '') && @$fv->isEmpty('Name', '')) {
//Prepare email from form
unset($_POST['Submit']);
$message = '';
$postkeys = array_keys($_POST);
foreach ($postkeys as $p) {
$message.= ucfirst(str_replace('_', ' ', $p)).": ".$_POST[$p]."\n";
}
} else {
$postkeys = array_keys($_POST);
foreach ($postkeys as $p) {
$_SESSION['earrings_form'][$p] = $_POST[$p];
}
$get = '?error=true&mount='.$_POST['Mount_ID'].'&';
if (@!$fv->isEmpty('Name', '')) {
$get.= "name=false&";
}
if (@!$fv->isEmail('Email', '')) {
$get.= "email=false&";
}
header("Location: form.php".$get);
}
?>