Posted by Misteka on 11/14/93 11:54
Hi guys,
Here is my code. Redirect to index.php not working. Have trawled
through old topics but can't fix it.
<?php
session_start();
if (isset($_POST["login"])) {
$missingfields = array();
foreach ($_POST as $var=>$val) {
if ($val == "") {$missingfields[$var] = $val;}
}
if (count($missingfields) > 0) {
print "You missed out one or more fields:<BR />";
foreach($missingfields as $key=>$value) {
print $key . ", ";
}
}
else {
foreach ($_POST as $key => $value) {
$_SESSION[$key] = $value;
}
session_write_close();
header("Location: http://shsc-int_staging.brookes.ac.uk/index.php");
}
}
?>
Any help or assistance appreciated.
Navigation:
[Reply to this message]
|