DJTim666 Posted June 19, 2007 Share Posted June 19, 2007 I need an opinion on my code. I am VERY sorry if this isn't the correct board, I couldn't find a board that suited this question. Anyways, anything wrong with this code? Any ways to improve it. <html> <head> <title>Unbeatable Slots - <?php $ranNumberWin = "<font color=green><b>$ranNumber</b></font> -- <font color=blue><b>$ranNumber2</b></font> -- <font color=orange><b>$ranNumber3</b></font> -- <font color=brown><b>$ranNumber4</b></font>"; $winningNumbers = "<font color=green><b>445572</b></font> -- <font color=blue><b>982612</b></font> -- <font color=orange><b>72623</b></font> -- <font color=brown><b>109563</b></font>"; if ($ranNumberWin == $winningNumbers){ echo "Winner"; } else { echo "Loser"; } ?></title> </head> <body> <font face=verdana size=2> <center> <h1>Unbeatable Slots</h1> <img src="http://games.trulyours.com/images/Untitled-3 copy.png"> <br /> <br /> <?php $spin = stripslashes($_GET['spin']); $ranNumber = rand(1, 1000000); $ranNumber2 = rand(1, 1000000); $ranNumber3 = rand(1, 1000000); $ranNumber4 = rand(1, 1000000); $ranNumberWin = "<font color=green><b>$ranNumber</b></font> -- <font color=blue><b>$ranNumber2</b></font> -- <font color=orange><b>$ranNumber3</b></font> -- <font color=brown><b>$ranNumber4</b></font>"; $winningNumbers = "<font color=green><b>445572</b></font> -- <font color=blue><b>982612</b></font> -- <font color=orange><b>72623</b></font> -- <font color=brown><b>109563</b></font>"; $message = "*****"; $message2 = "<font color=red><b>LOSER</b></font><br /><br />Sorry, but you have not beaten the slots yet. The numbers you got were; <p>$ranNumberWin</p> and the winning numbers are; <p>$winningNumbers</p>"; if ($ranNumberWin == $winningNumbers){ echo $message; } else { echo $message2; } ?> <form action=slots.php method=get> <input type="hidden" name="spin" value="<?php echo $ranNumber; ?>" /> <input type="submit" value="Spin" /> </form> The slots have had <?php include("counter2.php"); ?> spins. <br /><br /> <a href="../index.php">Back</a> to games.<br /> </center> </font> </body> </html> Thanks -- DJ Quote Link to comment https://forums.phpfreaks.com/topic/56131-solved-text-based-game-help/ Share on other sites More sharing options...
teng84 Posted June 19, 2007 Share Posted June 19, 2007 upon posting pls specify your problem and dont leave the error checking with others. That can have your prob solve easily any way whats your question with that??/ Quote Link to comment https://forums.phpfreaks.com/topic/56131-solved-text-based-game-help/#findComment-277261 Share on other sites More sharing options...
DJTim666 Posted June 19, 2007 Author Share Posted June 19, 2007 I dont have an error in the coding, in fact, it works flaulessly. I am just looking for opinions, or improvments. Quote Link to comment https://forums.phpfreaks.com/topic/56131-solved-text-based-game-help/#findComment-277263 Share on other sites More sharing options...
DJTim666 Posted June 19, 2007 Author Share Posted June 19, 2007 Anyone Quote Link to comment https://forums.phpfreaks.com/topic/56131-solved-text-based-game-help/#findComment-277266 Share on other sites More sharing options...
teng84 Posted June 19, 2007 Share Posted June 19, 2007 cool seems like u want me to helppp astig!!!!! ok give what you really want to improve the codes you have Quote Link to comment https://forums.phpfreaks.com/topic/56131-solved-text-based-game-help/#findComment-277278 Share on other sites More sharing options...
Caesar Posted June 19, 2007 Share Posted June 19, 2007 Things you can do to improve 1. Layout/design - Use CSS 2. Take an OOP approach to your script. Quote Link to comment https://forums.phpfreaks.com/topic/56131-solved-text-based-game-help/#findComment-277281 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.