|
Posted by Jonathan N. Little on 10/19/06 13:01
Advo wrote:
<snip>
> Yet, when they return to the page, there value they selected is not
> shown in this box, instead, theres just a gap. The source seems
> correct, and this is whats shown:
>
> <select name="title" id="title">
> <option value="Mr" selected="selected"></option>
>
> so it is working like that, but still not showing anything.
Because you have made an HTML markup error with the OPTION element. You
are missing the 'displayed' text...
<option value="parsedValue">Displayed Value</option>
Your code:
> <?php
> if($_SESSION['title'] != "") {
> echo '<option value="'. $_SESSION['title'] .'"
> selected="selected"></option>';
> }
> ...
Needs to be:
if($_SESSION['title'] != "") {
echo '<option value="'. $_SESSION['title'] .'"selected="selected">' .
$_SESSION['title'] .'</option>'; }
....
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|