Jump to content

Changing one row text


dean7

Recommended Posts

Hey all, I'm making game which allows you to "Race" the computer, if you are quicker than the computer you win if you not you lose. I'm allowing users to race 3 computers on one script, but after they raced on it they cannot do it again for another 2 minutes.

 

Problem I'm having is after they clicked the race name it should automatically say that you cannot race again for the 2 min but still allow you to race the other races. Although, currently when you race the first race it updates as it should but it says "You must wait 2 minutes before you can race again" on the races I haven't raced and says I must wait  17273day(s) 18hr(s) 29min(s) 35sec(s) until I re click the page the it says the correct thing for all races.

 

echo '<form name="form1" method="post" action=""><br /> <table width="650" border="1" align="center" class="table"><tr align="center" class="header"> <td colspan="2">Drag Race</td></tr><tr class="UnderTable"> <td align="center">Distance</td></tr>'; $timersclear = TRUE;if($UserStuff['dragone'] + $timer < $now) {echo"<tr><td align='center'><a href='?DragOne=QuarterMile'>Quarter Mile Drag</a></td></tr>";}else{$timersclear = FALSE;$timeleft1 = ($UserStuff['dragone']+$timer) - $now;$timeleft1 = seconds($timeleft1);echo"<tr><td colspan='2' align='center'>Please wait for this dragster to return! || $timeleft1</td></tr>";}if($UserStuff['dragtwo'] + $timer < $now) {echo"<tr><td align='center'><a href='?DragTwo=HalfMile'>Half Mile Drag</a></td></tr>";}else{$timersclear = FALSE;$timeleft2 = ($UserStuff['dragtwo']+$timer) - $now;$timeleft2 = seconds($timeleft2);echo"<tr><td colspan='2' align='center'>Please wait for this dragster to return! || $timeleft2</td></tr>";} if($UserStuff['dragthree'] + $timer < $now) {echo"<tr><td align='center'><a href='?DragThreeMile'>Mile Drag</a></td></tr>";}else{$timersclear = FALSE;$timeleft3 = ($UserStuff['dragthree']+$timer) - $now;$timeleft3 = seconds($timeleft2);echo"<tr><td colspan='2' align='center'>Please wait for this dragster to return! || $timeleft3</td></tr>";}     echo '</tr></table>';

 

Is there a way I could perhaps stop this problem? Thanks

Link to comment
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.