0

I am having trouble with a page where i need to insert data into a SQL field. It comes up with this error 7 times:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /

i would post the actual php page but its over 1000 lines long so i have uploaded a text file.

http://www.danwhybrow.com/form.txt

If anyone could fix it i would be so grateful.

Thanks

Dan

4
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by kishan112
0

Sorry to double post but here are the line numbers that it says:

on line 171
on line 381
on line 591
on line 799
on line 1007
on line 1215
on line 1423

0

Can you please give the exact error message please?
and are you sure the dbConfig.php is loaded correctly?

0

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/dan/public_html/staff/timetable/form.php on line 169

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/dan/public_html/staff/timetable/form.php on line 379

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/dan/public_html/staff/timetable/form.php on line 589

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/dan/public_html/staff/timetable/form.php on line 797

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/dan/public_html/staff/timetable/form.php on line 1005

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/dan/public_html/staff/timetable/form.php on line 1213

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/dan/public_html/staff/timetable/form.php on line 1421

there are two pages the form.php and addperm.php

this is addperm.php

<?php

include ("dbConfig.php");

$day = $_POST['day'];

$time = $_POST['time'];

$name = $_POST['showname'];

$perm = $_POST['perm'];







if ($perm == 'perm'){

mysql_query("UPDATE perm$day SET $time='$name'");

mysql_query("UPDATE $day SET $time='$name'");

}

else{

mysql_query("UPDATE $day SET $time='$name'");

}



header ("Location: form.php?time=booked");

?>

Edited by DJDan93: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.