I've just come back to PHP after a long break and am writing a very simple form, but the variables are not being passed on submit. Sorry if this is a daft question, but I don't rememeber ever having this problem before.
I'm using EasyPHP1-8, but I can't see anything in the .ini files that would cause this.
here's the script, please suggest something.
Thanks, Jo
<!--Table for Log In-->
<form method="post" name="loginform" action="Login.php">
<table align="center" width="300" border="2" cellpadding="0" cellspacing="5">
<tr height=18>
<th width="300"> Please enter PASSWORD:</th>
</tr>
<tr height=18>
<td width="300">
<input name="pword" type="password" size="40" >
</td>
</tr>
<tr>
<td colspan="2" align="center" valign="center">
<input type="submit" value="Submit">
</td>
</tr>
</table>
</form>
<!--End Login Table-->
</div>
<div style="position: absolute; left: 200px; top: 350px; padding: 0px;
z-index: 1;">
<hr/>
text here
</div>
<?
if ($_SERVER["REQUEST_METHOD"] == "POST" ) // if user has attempted login
{
if (empty($pword))
{
echo "<div id=\"loginmsg\">";
ErrorFormat();
echo "You have not entered all required fields. Please try again.";
EndFormat();
echo "</div>";
exit;
}
// change all inputs to lower case before registering session
$pword = strtolower($pword);
echo $pword."<br/>";
if ($pword == "secret")
{
echo "password matched<br/>";
#$valid_user = $username;
// if they are in the database register the user id session variable
if (isset($_SESSION['hist']))
{
$redirect_to = $_SESSION['hist'];
if (isset($_SESSION['posted']))
{
$redirect_to = $redirect_to."?".$_SESSION['posted'];
}
redirect("3", $redirect_to);
}
else
{
redirect("0", "Main.php");
}
}
}// end process login