I am getting some strange behavior with a PHP page I am coding:
I have some code that displays a MENU (with the letters of the alphabet):
<FORM NAME="getletter" ACTION="Service_Dates_detail.php?id_Event=<?php echo $id_Event; ?>" METHOD="POST">
<table width="389" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="49" class="style14">Filter:</td>
<td width="315"><span class="style14">Select Song</span>
<input type="hidden" name = "id_Event2" value = "$id_Event" />
<input type="hidden" name = "type" value = "Getletter" /> </td>
</tr>
<tr>
<td height="25">
<select name="Letter" onchange="document.forms.getletter.submit();">
<option value="" ></option>
<option value="A" >A</option>
<option value="B" >B</option>
<option value="C" >C</option>
<option value="D" >D</option>
<option value="E" >E</option>
<option value="F" >F</option>
<option value="G" >G</option>
<option value="H" >H</option>
<option value="I" >I</option>
<option value="j" >J</option>
<option value="K" >K</option>
<option value="L" >L</option>
<option value="M" >M</option>
<option value="N" >N</option>
<option value="O" >O</option>
<option value="P" >P</option>
<option value="Q" >Q</option>
<option value="R" >R</option>
<option value="S" >S</option>
<option value="T" >T</option>
<option value="U" >U</option>
<option value="V" >V</option>
<option value="W" >W</option>
<option value="X" >X</option>
<option value="Y" >Y</option>
<option value="Z" >Z</option>
</select></td>
<td><select name="id_Song">
<? echo $dd; ?>
</select>
<input name="Song_Add" type="submit" id="Song_Add" value="ADD" /></td>
</tr>
</table></FORM>
I am trying to echo back a to the field the last LETTER they picked. I thought this would work:
<FORM NAME="getletter" ACTION="Service_Dates_detail.php?id_Event=<?php echo $id_Event; ?>" METHOD="POST">
<table width="389" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="49" class="style14">Filter:</td>
<td width="315"><span class="style14">Select Song</span>
<input type="hidden" name = "id_Event2" value = "$id_Event" />
<input type="hidden" name = "type" value = "Getletter" /> </td>
</tr>
<tr>
<td height="25">
<select name="Letter" onchange="document.forms.getletter.submit();">
<option value="" <?php if($Letter =="") { echo "selected"; } ?>></option>
<option value="A" <?php if($Letter =="A") { echo "selected"; } ?>>A</option>
<option value="B" <?php if($Letter =="B") { echo "selected"; } ?>>B</option>
<option value="C" <?php if($Letter =="C") { echo "selected"; } ?>>C</option>
<option value="D" <?php if($Letter =="D") { echo "selected"; } ?>>D</option>
<option value="E" <?php if($Letter =="E") { echo "selected"; } ?>>E</option>
<option value="F" <?php if($Letter =="F") { echo "selected"; } ?>>F</option>
<option value="G" <?php if($Letter =="G") { echo "selected"; } ?>>G</option>
<option value="H" <?php if($Letter =="H") { echo "selected"; } ?>>H</option>
<option value="I" <?php if($Letter =="I") { echo "selected"; } ?>>I</option>
<option value="j" <?php if($Letter =="J") { echo "selected"; } ?>>J</option>
<option value="K" <?php if($Letter =="K") { echo "selected"; } ?>>K</option>
<option value="L" <?php if($Letter =="L") { echo "selected"; } ?>>L</option>
<option value="M" <?php if($Letter =="M") { echo "selected"; } ?>>M</option>
<option value="N" <?php if($Letter =="N") { echo "selected"; } ?>>N</option>
<option value="O" <?php if($Letter =="O") { echo "selected"; } ?>>O</option>
<option value="P" <?php if($Letter =="P") { echo "selected"; } ?>>P</option>
<option value="Q" <?php if($Letter =="Q") { echo "selected"; } ?>>Q</option>
<option value="R" <?php if($Letter =="R") { echo "selected"; } ?>>R</option>
<option value="S" <?php if($Letter =="S") { echo "selected"; } ?>>S</option>
<option value="T" <?php if($Letter =="T") { echo "selected"; } ?>>T</option>
<option value="U" <?php if($Letter =="U") { echo "selected"; } ?>>U</option>
<option value="V" <?php if($Letter =="V") { echo "selected"; } ?>>V</option>
<option value="W" <?php if($Letter =="W") { echo "selected"; } ?>>W</option>
<option value="X" <?php if($Letter =="X") { echo "selected"; } ?>>X</option>
<option value="Y" <?php if($Letter =="Y") { echo "selected"; } ?>>Y</option>
<option value="Z" <?php if($Letter =="Z") { echo "selected"; } ?>>Z</option>
</select></td>
<td><select name="id_Song">
<? echo $dd; ?>
</select>
<input name="Song_Add" type="submit" id="Song_Add" value="ADD" /></td>
</tr>
</table></FORM>
But when I use it, only half my page renders and the other half is ignored.
Is there a better way to handle this? Thanks!