Forum Moderators: coopster
If I have a form with an e-mail and password feild sometimes it reads the e-mail field as "username?password=enteredpassword" instead of breaking them apart.
It doesn't do it all of the time. I cannot figure out what is going on.
Any suggestions?
Here is the form:
<form method="post" action="verify.php" style="margin:0px;padding:0px">
<table><tr><td style="text-align:right;font-weight:bold">E-Mail</td><td><input type="text" name="txtUsername" size="20"></td></tr>
<tr><td style="text-align:right;font-weight:bold">Password</td><td><input type="password" name="txtPassword" size="10"></td></tr>
<tr><td> </td><td><input type="submit" value="LOG IN"></td></tr>
</table>
<br><a href="register.php">Not a member? Register Here.</a></form>
I have tried changing between post and get methods and neither makes a difference. In the GET method the query string looks normal, but is not encoded.
Your query string must look like so
verify.php?txtUsername=username&txtPassword=enteredpassword
which I can't figure out why you'd get
username?password=enteredpassword
$txtUsername = (isset($_POST['txtUsername']))? $_POST['txtUsername'] : '';
$txtPassword = (isset($_POST['txtPassword']))? $_POST['txtPassword'] : '';
$txtUsername = (isset($HTTP_POST_VARS['txtUsername']))? $HTTP_POST_VARS['txtUsername'] : '';
$txtPassword = (isset($HTTP_POST_VARS['txtPassword']))? $HTTP_POST_VARS['txtPassword'] : '';