Jump to content

[SOLVED] Problem with query


Thomisback

Recommended Posts

Hi,

 

I'm having trouble with my query, it says "Error!" or "You cannot duel yourself!" !

 

<?PHP
$id = $_POST['id'];
$infoz = mysql_query("SELECT * FROM `dobbel` WHERE gamename='$prefix' AND `id`='$id'");
$info = mysql_fetch_object($infoz);
$userstat = mysql_query("SELECT * FROM `users` WHERE gamename='$prefix' AND `login`='$infoz->starter'");
$us = mysql_fetch_object($userstat);

if($info->inzet > $data->bank){
print "<table width=100%><tr><td class=mainTxt> Not enough money! </tr></td> ";
exit; }

if($userstat->login == $data->login){
print " <table width=100%><tr><td class=mainTxt>You cannot duel yourself!!  </tr></td>";
exit;}

if($userstat->login == ""){
print " <table width=100%><tr><td class=mainTxt> Error! </tr></td>";
exit;}
?>

 

If anyone has suggestions please reply,

 

Thank you!

Link to comment
https://forums.phpfreaks.com/topic/100108-solved-problem-with-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.