Im deeply confused, because Ive done this a million times before. Im sure the mistake is obvious but Im just missing it somehow. please help
<?
require ('config.php');
//make the connection to the database
$connection = mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = mysql_select_db($db_name,$connection)or die(mysql_error());
?>
<h1>TEST PAGE</h1>
<form name="test" method="post" action="">
<input type="text" name="email" size="20" maxlength="255">
<input type="submit" name="getit" value="submit">
<?
if (isset($getit)) {
echo "<br><br>submit button has been pressed (test 1 ok)";
$thequery = mysql_query("SELECT * from authorize WHERE email = '".$POST[email]."'") or die("<br><br>couldnt do query because".mysql_error());
$thenumber = mysql_num_rows($thequery) or die("<br><br>couldnt get number because".mysql_error());
echo "<br><br> $thenumber if you see this number test 2 is ok.";
}
?>
</form>
Error:
"submit button has been pressed (test 1 ok)
couldnt get number because"
😕
additionally, I noticed that if I replace
$thenumber = mysql_num_rows($thequery) or die("<br><br>couldnt get number because".mysql_error());
with $thenumber = mysql_num_rows($thequery) ;
It will print out "0 if you see this number test 2 is ok." if no email or a fake email address is typed but nothing atall if a existing email address is typed. This doesnt seem to be related to my database either, for instance, the address inshadowsgrowingwings@hotmail.com does not exist in my database, but if i type this address in itll print nothing.
Prob page currently hosted at
http://www.printedexistence.com/dating_site/testing.php