Need an If/Else Statement - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: PHP The Hypertext Preprocessor (https://www.supportforums.net/forumdisplay.php?fid=21) +---- Thread: Need an If/Else Statement (/showthread.php?tid=3353) |
Need an If/Else Statement - Grizzly - 12-05-2009 I need an if/else statement. I would like it to check to see if a countdown clock has reached 0. If it reaches 0 I want to cancel a login form and a registration link. The countdown script is an include on the login.php file. The variable that is called is $difference. This will probably be an include as well. RE: Need an If/Else Statement - Gaijin - 12-05-2009 I don't really understand you, but is this what you are looking for! PHP Code: if($difference != 0) { RE: Need an If/Else Statement - Grizzly - 12-05-2009 Sent you a PM. Something like PHP Code: if($difference != 0) { Or an easier way to do that if there is one. Or maybe it will display the login if $difference != 0, else login form and registration link are not displayed, but the above message (or a different one if I edit it) is displayed. RE: Need an If/Else Statement - Gaijin - 12-05-2009 As I've said in the PM, you should use the GET method. But you could also do the same check when calling the login form and the register link. And simply not show them if $diff... is 0. But the user could then still login. RE: Need an If/Else Statement - Spl3en - 12-06-2009 It exists differents manner to compare a date with another, i don't know if you already know it ! you can try something like this : PHP Code: function game_is_okay($todays_date){ RE: Need an If/Else Statement - Grizzly - 12-10-2009 I'm going to have to put this bit on hold. The project that I was working on has been placed on hold while I try to promote a different game. Although, I may look into implementing this into the game I have now. |