Hey Guys, I'm trying to get a form to submit to a mysql script and pull different variables when you select different values from the form, but I can't get it to work, can someone help me? Here's my code so far:
<?php if ($submit) // process form $namequery = mysql_query( "SELECT * FROM rahs AS playername WHERE (name = '$name')"); $stats = mysql_query( "SELECT $stat FROM rahs AS playerstat WHERE (name = '$name')"); while($set=mysql_fetch_array($namequery)){ printf ( "Name: %s<br>",$set["playername"]); } while($stats2=mysql_fetch_array($stats)): printf ("$stat: %s",$stats2["playerstat"]); endwhile; } else { I know this code is only part of it, but its the only part that needs work. I have a working model here: http://www.3d-unlimited.com/rahslax/test6.php Can someone help me get it to work? Thanks! -------------------------------------------- -Alex "Big Al" Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-1391 ICQ: 3969599 Owner of the 3D-Unlimited Network: http://www.3d-unlimited.com Send News: [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php