Sep 14th, 2009, 11:36 PM
Has anyone run into trouble keeping the values in drop downs?
When I try to put in the documented code for mine:
It spits back the following on loading the page:
If you run a test of the form, it clears the values back to normal and if you try it a second time, it works... but obviously I need it to work the first time around.
The page being worked on is:
http://fasports.com/az/phx/mondays_new.php -- but it might be changing as I'm still playing around with it
Any help is appreciated... thanks!
When I try to put in the documented code for mine:
PHP Code:
<select name="Played_Before" class="registration">
<option <?php if ($fields["Played_Before"] == "Select One") echo "selected"; ?>>Select One</option>
<option <?php if ($fields["Played_Before"] == "Yes") echo "selected"; ?>>Yes</option>
<option <?php if ($fields["Played_Before"] == "No") echo "selected"; ?>>No</option>
</select>
It spits back the following on loading the page:
PHP Code:
<select name="Played_Before" class="registration">
<option <br />
<b>Notice</b>: Undefined index: Played_Before in <b>/home/fasports/public_html/az/phx/includes/league_registration_new.php</b> on line <b>98</b><br />
>Select One</option>
<option <br />
<b>Notice</b>: Undefined index: Played_Before in <b>/home/fasports/public_html/az/phx/includes/league_registration_new.php</b> on line <b>99</b><br />
>Yes</option>
<option <br />
<b>Notice</b>: Undefined index: Played_Before in <b>/home/fasports/public_html/az/phx/includes/league_registration_new.php</b> on line <b>100</b><br />
>No</option>
</select>
If you run a test of the form, it clears the values back to normal and if you try it a second time, it works... but obviously I need it to work the first time around.
The page being worked on is:
http://fasports.com/az/phx/mondays_new.php -- but it might be changing as I'm still playing around with it
Any help is appreciated... thanks!