Jump to content

ok

Members
  • Posts

    130
  • Joined

  • Last visited

    Never

Everything posted by ok

  1. so when i browse it again using firefox the $link is gone. thank you again.
  2. hi i have this url below. http://www.samplesite.com/index.php?view=jp&sid=742TlRrM09EWTFORGt3T&sid2=742Tl&siduid=742&link=54 now what i'm doing right now is i'm trying to replace the value of $link=54 with empty value or just remove it. from the link. how could i do that? thanks in advance.
  3. thanks guys i already figured it out. the value of jtablegrid_link is empty.
  4. thanks for your comments my friend. but i'm going insane with this. is there a problem that you see in my codes?
  5. ok i have these codes below. if($link!=$jtablegrid_link) { //this condition will limit the player from accidentally clicking the already taken number if($user_click<50) { //if user has tickets equal or greater than 1 if($balance_jackpot>=1 || $balance>=1) { //check record existence first before writing. $strQuery1 = "select count(*) as cnt from jtablegrid where box_no='".$link."'"; $res = mysql_query($strQuery1); $row = mysql_fetch_array($res); $intCount = $row['cnt']; if($intCount == 0) { $query = "INSERT INTO jtablegrid (username, box_no) VALUES ('$username','.$link.')"; mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); } //this will subtract balance and balance_jackpot. //everytime a user click it subtract 1 ticket from balance_jackpot column or from balance. if($balance_jackpot>=1) { $jackpot_subtracted = $balance_jackpot-1; //then update user table. $query = "UPDATE user SET balance_jackpot='$jackpot_subtracted' WHERE username='$username'"; mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); } elseif($balance>=1) { #$balance_original = $balance; #$balance = floor($balance); //round down. if($balance>=1){ $balance_tmp = $balance-1; //then update user table. $query = "UPDATE user SET balance='$balance_tmp' WHERE username='$username'"; mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); } } } else { echo "<br><br>"; echo "<b>Sorry, you don't have enough ticket.</b>"; echo "<br><br>"; } } else { echo "<br><br>"; echo "<b>You already reached the 50 click user limit per game.</b><br>"; echo "<b>Please wait for the next game, Thank you!</b>"; echo "<br><br>"; } } elseif($link==$jtablegrid_link) { echo "<br><br>"; echo "<b>That number is already taken.</b>"; echo "<br><br>"; } what really bother me is when this if below is false if($link!=$jtablegrid_link) it still execute the other if inside it. what do you think is a nice remedy for this? or do you see bugs on my if elseif statements? Thank you in advance.
×
×
  • 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.