Hey guys, I need a little help on this one....
For some reason its giving me this "Warning: Supplied argument is not a valid MySQL result resource in /home3/sexyjustin/public_html/bkparties.com/submit.php on line 9" BUT yet it still adds the party... I am trying to get it to check the IP Given, so it will only let that IP add a party a max of 3 times... Please help
-Justin
<?php
$ip = $REMOTE_ADDR;
include "db_info.php";
$db = mysql_connect($host,$username,$password);
mysql_select_db($database,$db);
$table = "SELECT FROM `party` WHERE `ip` = '$ip'";
$result = mysql_query($table, $db);
$num_rows = mysql_num_rows($result);
if($num_rows > 2)
{
echo "You have already added 3 parties. Please email admin@bkparties.com to delete a party so you may add another 🙂";
} else {