tstats Posted May 1, 2006 Share Posted May 1, 2006 I would like to change the following update form -[code]<HTML><FONT size=+2><B><I>Enter Games for your Tournament<BR><BR><BR><BR> </B></I></FONT></center><body bgcolor="#ffffff"> <form action="updatescores.php" METHOD=POST ENCTYPE="multipart/form-data"> Age: <BR><input type="checkbox" select name="age" value="7">7 <input type="checkbox" select name="age" value="8">8 <input type="checkbox" select name="age" value="9">9 <input type="checkbox" select name="age" value="10">10 <input type="checkbox" select name="age" value="11">11 <input type="checkbox" select name="age" value="12">12 <BR><BR>Game: <BR><input type="checkbox" select name="game" value="1">1 <input type="checkbox" name="game" value="2">2 <input type="checkbox" name="game" value="3">3 <input type="checkbox" name="game" value="4">4 <input type="checkbox" name="game" value="5">5 <input type="checkbox" name="game" value="6">6 <input type="checkbox" name="game" value="7">7 <input type="checkbox" name="game" value="8">8 <BR><BR><input type="submit" value="Enter Scores >>"> </form> <BR><BR></body> </html> [/code]I would like to have the following for updatescores.php:When I choose the data for game and age, it brings up a php form that shows the following fields for editing for that age and game: id team1 team2 score1 score2 diffWhere the Field names are: id autonumber age int(11) game int(11) day varchar(25) time varchar(10) field varchar(50) team1 varchar(50) score1 int(11) score2 int(11) team2 varchar(50) diff int(11) seed int(11) pool int(11) group varchar(4)I have the following code - but it brings up ALL games instead of just the one that I want to edit:[code]<html><body><?$ud_id=$_POST['ud_id'];$ud_team1=$_POST['ud_team1'];$ud_team2=$_POST['ud_team2'];$ud_score1=$_POST['ud_score1'];$ud_score2=$_POST['ud_score2'];$ud_diff=$_POST['ud_diff'];****/code for connecting to database is here***mysql_query(" UPDATE tournament SET team1='$ud_team1' ,team2='$ud_team2',score1='$ud_score1',score2='$ud_score2' WHERE id='$ud_id'");?></body></html> [/code]Please let me know if you have any questions - I would appreciate any help on this!Thanks. Quote Link to comment 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.