Jump to content

[SOLVED] Drop Down Menu Form


jbresette

Recommended Posts

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?

Link to comment
Share on other sites

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."";
}
?>

Link to comment
Share on other sites

<?
$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. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.