Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a pulldownn value - how to integrate into defined value. 2

Status
Not open for further replies.

stla

IS-IT--Management
Mar 12, 2003
190
DE
(Elementary user)

Good day,
Below is an excerpt from a PHP file that is displayed in an HTML page:

$form_sent = false;
$value_email_customer = "";
$value_email_sender = "";

Our goal is to have a pull down list for value_email_sender eg.:

Mr Brown
Mrs Jones
Miss Smith

Can anyone please help me with the syntax?

Best regards
 
use an html select box. but I fear you are on the wrong site.
 
Not sure I understand the question, though.

A <select> tag will do what you want for the pull down, but I'm to sure what that has to do with your static variables there?



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thank you both very much; I found the correct location:

<td><b><span style="<?php if($value_email_sender=="") echo $style_error;?>">E-Mail-Adresse des Absenders:</span></b></td>
<td></td>
<td><select><option value="smith@somedomain.com">Miss Smith</option><option value="jones@somedomain.com">Mrs Jones</option></select></td>
 
Could either of you please help me get the previous pull down values in to the following:


<input type="text" name="email_sender" size="60" value="<?php echo $value_email_sender;?>"></input>
 
Code:
<select name="value_email_sender">
...
</select>

Code:
$value_email_sender=$_POST['value_email_sender'];

Assuming of course your form is using the POST method.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top