"")
exit;
// check for required fields
$_SESSION['errors'] = "";
foreach($required as $field) {
if (!$_POST[$field]) {
$_SESSION['errors'] .= " - $field is a required field
";
}
}
if (!isValidEmail($_SESSION['email']))
{
$_SESSION['errors'] .= "- Invalid email address
";
}
// if all fields OK
if ($_SESSION['errors'] == "")
{
// create an entry in the demo log file
$_SESSION['date'] = date('m/d/y H:i:s');
if (@$_SESSION['demo_path'] == "/demo")
//$logfile = "../../log/demo_special.txt";
$logfile = "../../logs/demo_special.txt";
else
//$logfile = "../../log/demo.txt";
$logfile = "../../logs/demo.txt";
$fp = fopen($logfile, "a");
foreach($allfields as $field) {
fwrite($fp, $field . "=" . @$_SESSION[$field] . "\r\n");
}
fwrite($fp, "demopath=" . @$_SESSION['demo_path'] . "\r\n");
fwrite($fp, "=\r\n");
fclose($fp);
// display download page
echo '
|