AnAmericanGunner Posted May 29, 2010 Share Posted May 29, 2010 I... I have a serious mess going on with this randomizer I am creating. =/ It's a serious mess because I am trying to write it out and then condense, but I didn't use comments in the first round and now I'm back to the beginning (well kinda). Here's the page I need help with: <html> <head> <title>ERAHA Randomizer</title> </head> <body> <p> <b><? echo $showname ?></b> </p> <p> <form action="random.php" method="post"> <table> <? // pull class #1 name include ('database.php'); $query = "SELECT * FROM arabclass WHERE classnum='1'"; $result = mysql_query($query) or die(mysql_error()); ?> <? while($row= mysql_fetch_array($result)) { $cnum = $row['classnum']; $cname = $row['classname']; ?> <? // show class #1 name ?> <strong><? echo $cnum ?>. <? echo $cname ?></strong> <br /> <? // pull class #1 entries $query = "SELECT * FROM arabenter WHERE classnum LIKE '%1%'"; $result = mysql_query($query) or die(mysql_error()); ?> <? while($row= mysql_fetch_array($result)) { $hname = $row['hname']; ?> <? // show class #1 entires ?> <tr><td><input type="text" width="200" height="200" value="<? echo $hname ?>" name="entry"> <? } ?><br /><br /> <? } ?> </td></tr> </table> <p><input type='submit' name='sname' value='All Set?'></p> </form> </body> </html> Here's what I'm trying to do: The class name & number are being pulled from arabclass (which would be like classnum || class name -- 1 || Weanling Fillies). Then from arabenter there are: hname || classnum hname lists a horses name (IE Kindlers Fancy) with the entries (1,2,3, ect.) Now, what it needs to do is pull each class (1 through whatever) and the horse's names from each class. I'm just really lost right now... And maybe it'd be best to scrap this project and start over... Link to comment https://forums.phpfreaks.com/topic/203253-randomizer-help-serious-mess/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.