jbresette Posted June 23, 2007 Share Posted June 23, 2007 Here is my form http://www.jbresette.com/wrestling/dualform.php My question is this. At the top for Home Team and Away Team I am pulling the team names out of my database using PHP. Then when you get to the wrestlers each wrestler has a school. Therefore, I want their choices to only be between the two selected at the two teams selected at the top of the form. How would I go about putting those values in the form pulling it from the values at the top? Quote Link to comment Share on other sites More sharing options...
jbresette Posted June 23, 2007 Author Share Posted June 23, 2007 I have something like this but keep getting the error Parse error: parse error, unexpected T_STRING, expecting ')' in /home/content/j/b/r/jbresette/html/wrestling/dualform.php on line 85 <? $selectedHomeTeam = "Home Team"; $selectedAwayTeam = "Away Team"; function changedHome(HomeTeam) { $selectedHomeTeam = "".HomeTeam.options[HomeTeam.selectedIndex].value.""; } function changedAway(AwayTeam) { $selectedAwayTeam = "".AwayTeam.options[AwayTeam.selectedIndex].value.""; } ?> Quote Link to comment Share on other sites More sharing options...
jbresette Posted June 23, 2007 Author Share Posted June 23, 2007 <? $selectedHomeTeam = "Home Team"; $selectedAwayTeam = "Away Team"; function changedHome() { $selectedHomeTeam = $_GET('HomeTeam'); } function changedAway() { $selectedAwayTeam = $_GET('AwayTeam'); } ?> Ok I got past that error, now I have to figure out when to call the function in the form. Quote Link to comment Share on other sites More sharing options...
jbresette Posted June 23, 2007 Author Share Posted June 23, 2007 Is there any way to call a PHP function in a form drop down list like : onchange = "the PHP function()"? 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.