peterisgb Posted February 26, 2013 Share Posted February 26, 2013 i want to make a horse race, where people can bet on a horse and win or loose. i need a little help with a few of the actions. this is what i got so far <?php include "globals.php"; global $db,$ir,$r,$c,$userid,$h,$li; $db->query("UPDATE users SET lastpage='Race track' WHERE userid=$userid"); switch($_GET['action']) { case 'betonhorse2': do_betonhorse_change(); break; case 'racehorse2': do_racehorse_change(); break; default: tracks_home(); break; } function tracks_home() { global $db,$ir,$c,$userid,$h; $horsespeed1=rand(3, 15); $horsespeed2=rand(3, 15); $horsespeed3=rand(3, 15); $horsespeed4=rand(3, 15); print " <table bgcolor='white'><tr><td> <hr color='red' width='40%'><font color='red' size='+2'><center>1</center></font><hr color='red' width='40%'> <marquee behavior='scroll' scrollamount='$horsespeed1'><img src='images/horse.gif'></marquee> <br /> <hr color='blue' width='40%'><font color='blue' size='+2'><center>2</center></font><hr color='blue' width='40%'> <marquee behavior='scroll' scrollamount='$horsespeed2'><img src='images/horse.gif'></marquee> <br /> <hr color='green' width='40%'><font color='green' size='+2'><center>3</center></font><hr color='green' width='40%'> <marquee behavior='scroll' scrollamount='$horsespeed3'><img src='images/horse.gif'></marquee> <br /> <hr color='orange' width='40%'><font color='orange' size='+2'><center>4</center></font><hr color='orange' width='40%'> <marquee behavior='scroll' scrollamount='$horsespeed4'><img src='images/horse.gif'></marquee> </td </tr></table> "; } print ""; $h->endpage(); ?> Quote Link to comment Share on other sites More sharing options...
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.