Jump to content
MakeWebGames

Warning: mysql_fetch_array()


thebobby

Recommended Posts

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/blaz1986/public_html/anewhitlist.php on line 160

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/blaz1986/public_html/anewhitlist.php on line 160

 

$newer = mysql_query("SELECT * FROM grppusers WHERE id='$target'");

 

line160 $abcdef=mysql_fetch_object(mysql_query($newer));

 

 

 

if ($abcdef->id == $fetch->id){ echo "You can't hitlist yourself!"; }elseif ($abcdef->id != $fetch->id){

 

 

change to mysql_fetch_array and still had error

Link to comment
Share on other sites

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/blaz1986/public_html/anewhitlist.php on line 160

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/blaz1986/public_html/anewhitlist.php on line 160

 

$newer = mysql_query("SELECT * FROM grppusers WHERE id='$target'");

 

line160 $abcdef=mysql_fetch_object(mysql_query($newer));

 

 

 

if ($abcdef->id == $fetch->id){ echo "You can't hitlist yourself!"; }elseif ($abcdef->id != $fetch->id){

 

 

change to mysql_fetch_array and still had error

You have spelt grpgusers wrong

Link to comment
Share on other sites

if (strip_tags($_POST['Submit']) && strip_tags($_POST['target']) && strip_tags($_POST['an']) && strip_tags($_POST['amount']) && strip_tags($_POST['reason'])){



$target=strip_tags($_POST['target']);



$an=strip_tags($_POST['an']);



$amount=intval(strip_tags($_POST['amount']));



$reason=strip_tags($_POST['reason']);



if ($an == "1" || $an == "2"){







       if ($amount < 100000 || !$amount || ereg('[^0-9]',$amount)){



   print "You can only hitlist someone for $100,000+";







}elseif ($amount > 99999 && $amount && !ereg('[^0-9]',$amount)){







$newer = mysql_query("SELECT * FROM grpgusers WHERE id='$target'");



       $abcdef=mysql_fetch_object($newer);







if ($abcdef->id == $fetch->id){ echo "You can't hitlist yourself!"; }elseif ($abcdef->id != $fetch->id){



$target2 = mysql_query("SELECT * FROM grpgusers WHERE id='$target'");



if($target2->id =='0' or $target2->id =='0'){



print "You can't hitlist Admins or Mods!";}elseif ($target2->id=='0'){    



$check=mysql_query("SELECT * FROM grpgusers WHERE id='$target'");



$num=mysql_num_rows($check);



if ($num == "0"){



echo "User does not exist.";



}elseif ($num != "0"){



if ($an == "2"){



$total_cost=$amount + 100000;



}else{



$total_cost=$amount;



}



if ($total_cost > $fetch->money){



echo "You dont have enough money.";



}elseif ($total_cost <= $fetch->money){







mysql_query("INSERT INTO `hitlist3` ( `id` , `paid` , `target` , `reason` , `amount` , `anonymous` ) 



VALUES (



'', '$username', '$target', '$reason', '$amount', '$an'



)");







$new_money = $fetch->money - $total_cost;



mysql_query("UPDATE grpgusers SET money=money-$total_cost WHERE id='$username'");
mysql_query("UPDATE grpgusers SET hitlists=hitlists+1 WHERE id='$username'");



echo "User hitlisted";
Edited by Djkanna
Code tags
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...