I've a contact form, on my nearly finished website, allowing viewers to send the data, which I've validated with different validation rule depending on the data required for a field itself.
Website itself can be seen on:
http://members.lycos.co.uk/darsh25/AllInclusiveWebDesign/contact.php
Problem is with last 2 fields i.e. "Reply Required" AND "How would you like to be contacted?"
If user press the submit button, I want the "filled" fields remain same, hence, making them NOT to re-type what they's already done. I wish to do the same for these 2 options as well, hence whichever radio button they'd chosen, after pressing submit, if they mis-filled any fields (for example, "e-mail"), then I want the option chosen in 2 radio buttons staying same i.e. whatever they'd chosen
Problem is, after pressing "Submit" the radio button options for these 2, ALWAYS goes to the "second option" regardless of the option chosen ??? This makes them RE-chose the radio button option.
Related code
<tr id="contactTable">
<td id="contactTable">Reply Required:</td>
<td id="contactTable"><input type="radio" name="reply" value="Yes" checked="checked"/>Yes
<input type="radio" name="reply" value="No" <?php if ($reply="No") echo "checked='checked'"; ?>/>No</td>
</tr>
<tr id="contactTable">
<td id="contactTable">How would you like to be contacted <span class="italic">(if required)</span>?<br/><br/></td>
<td id="contactTable"><input type="radio" name="contact" value="Email" checked="checked"/>E-mail
<input type="radio" name="contact" value="Telephone" <?php if ($contact="Telephone") echo "checked='checked'"; ?>/>Telephone
</td>
</tr>
Wonder why's this happening ??? Can anyone help ???