Jump to content

Refill form values received from drop down menu


keyboarder

Recommended Posts

GREAT this forum - JUST GREAT !...

 

Issue: All data entered into my online form was lost (blanked out) and the form returned correctly with message "wrong verification code", when submitted with the wrong verification code.  However, going through this great forum I managed to get all - manually entered - data back ! I placed 

value="<?php echo $_GET['the_field_name'];?>"/  after each input field.

 

BUT... not so with input fields entered from drop-down menu !

How do I put a similar string for the field "Payment by" in this sample:

 

<tr>

<td class="table-inquire" width="47%">

<font face="Verdana" size="1" color="#000042">

Payment by:</font></td>

<td class="table-inquire" width="51%" colspan="2">

<font color="#400000" face="Verdana">

<select name="payment" size="1">

<option value="VISA">VISA</option>

<option value="MASTER">MASTER</option>

<option value="CASH">CASH</option>

<option value="T/T Banktransfer">T/T Banktransfer</option>

<option selected>Please select</option>

</select></font><font size="2" color="#400000" face="Verdana"></font></td>

</tr>

 

Any advise greatly appreciated. Thanks.

 

 

Link to comment
Share on other sites

OOOPS... It's me again:

 

Same counts for the message field. It's gone also....

Can anyone advise please, what I have to specify, in order to keep the message field preserved in this sample:

 

<font face="Verdana" size="2" color="#000042"><br>

Further comments:<br></font

<font color="#400000" face="Verdana">

<textarea rows="5" name="message" cols="60"></textarea>

 

Thanks again

Link to comment
Share on other sites

You use the same method as before;

 

<select name="payment"> 
		<option value="<?php echo $_POST['payment'];?>" selected><?php echo $_POST['payment'];?></option> 

Change _POST to _GET if using URL and Not a form.

 

The above keeps the value from the post data and  makes it the selected option so it shows just like it did on the prior form.

 

Not 100% thats what your asking but if so, there you go.

 

 

Bill.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.