bineye Posted January 5, 2011 Posted January 5, 2011 I'm making a mod to put into the free mods section and I think its a good idea, whether or not i can get it working is another thing. Can anyone see the parse error I'm getting here, on the print line? { $hwin=$_GET['bet']*1.5; $hgain=($_GET['bet']*1.5)-($_GET['bet']) print "You look over the crowds, and just about catch a glimpse of the number 1 on the side of the winning horse. You have won \$$hwin!"; $db->query("UPDATE users SET money=money+({$hgain}) where userid=$userid"); } Thanks guys. Quote
SilvaTungDevil Posted January 5, 2011 Posted January 5, 2011 line 3 needs to be : $hgain=($_GET['bet']*1.5)-($_GET['bet']); On a side note did you remember to secure the $_GET['bet'] ? Quote
bineye Posted January 5, 2011 Author Posted January 5, 2011 Thanks for that! Yeah secured it as far as I can see. Quote
Paul Evans Posted January 6, 2011 Posted January 6, 2011 # Example $_GET['bet'] = (isset($_GET['bet']) && ctype_digit($_GET['bet'])?$_GET['bet']:0); if ( empty($_GET['bet']) ) { echo 'error'; die; } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.