Re: php / mysql error Again
So what error are you getting?
Re: php / mysql error Again
Thats just it im not getting any it just posts it to the db and shows the page as though there were less than 2 entrys
Re: php / mysql error Again
Your server configurations may be different. I suspect that an error is occuring in your query. It would help to chekc the query result rather than the query text after you have called mysql_query(). Change your code to this to see if you get an error dispalyed.
PHP Code:
error_reporting(E_ALL);
$alarm_check = "SELECT atime, datetoplay FROM maintable WHERE atime = '" . $_POST['alarmtime'] . "' And datetoplay = '" . $_POST['datebox'] . "'"; // check if username exists in database.
if (! ($result1 = mysql_query($alarm_check))) {
die(mysql_error());
}
$num_row = mysql_num_rows($result1);
if ($num_row == 2) {
die('<p align="center">
<strong><font face="Century Gothic">Im sorry but this time slot is full.</font></strong>
</p><p align="center"><font face="Century Gothic"><a href="newentry.php">Please go back and pick another time</a></font></p>
<p align="center"><a href="index.html"><img src="images/smallhouse.gif" alt="Home" width="53" height="67" border="0"></a>
</p>');
}
Re: php / mysql error Again
thanks very much all it required was some one with a bit off knowledge and I found it in a missspelled variable
it was relating to the sql query
thanks again
chrisio
:)
Re: php / mysql error Again
Its always a good idea to set error reporting to E_ALL while developing. The display of notices when you misspell variables is a god send and without it you can get some very strange and confusing errors.