Jump to content

[SOLVED] PHP Form help


kyleldi

Recommended Posts

So I've got this form that has a drop down menu, pulling data from the db.  What I want to do is create a static value, "Other" and use PHP to display a new field underneath the drop-down for the user to enter in the value for "other" if it is selected.  Is this possible, and if so how would I go about it?  Thank You!

 

<label><select name="material" id="material">
          <option value="No Material Chosen">- Material Types -</option>
<?php
do {  
?>
          <option value="<?php echo $row_rs_materials['material']?>"><?php echo $row_rs_materials['label']?></option>
<?php
} while ($row_rs_materials = mysql_fetch_assoc($rs_materials));
  $rows = mysql_num_rows($rs_materials);
  if($rows > 0) {
      mysql_data_seek($rs_materials, 0);
  $row_rs_materials = mysql_fetch_assoc($rs_materials);
  }
?>
	<option value="Per Print">Per Print</option>
      </select></label>

Link to comment
https://forums.phpfreaks.com/topic/148931-solved-php-form-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.