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:
When I try to put in the documented code for mine:
PHP Code:
<?php
<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:
<?php
<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>
