Hi tfm,
Ah! The problem actually turned out to be just with the markup.
Dropdowns all need to have value="" attributes for the options. In the absence of the value attribute, some browsers send along whatever the content of the option tag is, but it's not standardized. So change this:
To this:
Then, add in the PHP code to have it re-filled:
For the textarea, don't bother with the value="" attribute. To re-fill a textarea, you need to output th content right within the tag itself:
Hope this helps -
Ben
Ah! The problem actually turned out to be just with the markup.
Dropdowns all need to have value="" attributes for the options. In the absence of the value attribute, some browsers send along whatever the content of the option tag is, but it's not standardized. So change this:
Code:
<select name="delai" id="delai">
<option />
<option>1 semaine</option>
<option>1 mois</option>
<option>Plus</option>
</select>
To this:
Code:
<select name="delai" id="delai">
<option value=""></option>
<option value="1 semaine">1 semaine</option>
<option value="1 mois">1 mois</option>
<option value="Plus">Plus</option>
</select>
Then, add in the PHP code to have it re-filled:
Code:
<select name="delai" id="delai">
<option value="" <?php if (@$fields["delai"] == "") echo "selected"; ?>></option>
<option value="1 semaine" <?php if (@$fields["delai"] == "1 semaine") echo "selected"; ?>>1 semaine</option>
<option value="1 mois" <?php if (@$fields["delai"] == "1 mois") echo "selected"; ?>>1 mois</option>
<option value="Plus" <?php if (@$fields["delai"] == "Plus") echo "selected"; ?>>Plus</option>
</select>
For the textarea, don't bother with the value="" attribute. To re-fill a textarea, you need to output th content right within the tag itself:
Code:
<textarea name="description" cols="50" rows="5" id="description"><?php echo @$fields["description"]; ?></textarea>
Hope this helps -
Ben