This is embarrasing to post, but I can't figure out why I keep getting a parse error in the following code:
The parse error is in the 2nd to last line at the
BTW, The $username and $password are sent into this via an HTML form.
code:<HR>Code:<html><head><title>DWFE Rough Draft</title></head> <body> <?php $con = odbc_connect("TestDB", "TestDBUser", "Password"); $userdata = odbc_exec($con, "Select * from Security"); $queryr = 0; while (odbc_fetch_row($userdata, $queryr + 1)) { $queryr++; } $UserRow = -1; do { $UserRow++; $temp = odbc_fetch_into ($userdata, $UserRow, $row); echo "Username entered = $username "; echo "Username tested = $row[1]"; if ($username <> $row[1]) { echo "User does not match. "; } elseif ($password = $row[2]) { echo "User matches, password correct. "; $authenticated = 1; } else { echo "User matches, password incorrect. "; } while (($Username <> $row[1]) and ($UserRow < $queryr)); if ($authenticated = 1) { echo " Congradulations, you were successfully authenticated! "; echo '<a href="initial_screen.htm">Click here to advance to the next screen.</a>'; } else { echo " Sorry, you didn't authenticate. "; echo '<a href="index.htm">Click here to try again.</a>'; } ?> </body></html>
The parse error is in the 2nd to last line at the
which is the closing tag to the PHP code. I haven't done anything different with this than on any other PHP script and don't know why it won't work. Hopefully somebody can point out to me my error so I can keep moving on this project.code:<HR>Code:?>
BTW, The $username and $password are sent into this via an HTML form.