Jump to content

USER UPDATING A FORM WITH DROP DOWN MENUS IN IT


barniegilly

Recommended Posts

Hi  I have a single page submission update page which incorporates 7 drop down menus and 2 text input fields,  everything works fine with the data updating back to the database,  the only thing is that when the page is updated  all the drop down menus are updated which includes ones that I don't want updated?

 

I need to only update the drop down menus that have been selected?  but am unsure how I do it?

 

This is the code from the page,  sorry if its a mess but I am not that experienced at the moment. 

This is a snippet of one of the drop down menus

 

 

 <tr>
  <td class="heading">Current Status</td>
  <td><?php echo   $statusdescrip ['status_description']; ?> 
  <select name="status_id" >
    <?php 
	$status_set = findstatus();
	$statuslist = mysql_fetch_assoc ($status_set);
?>
<?php 
do { 
?>   <option value="<?php echo $statuslist ['status_id']; ?>" ><?php echo $statuslist ['status_description']; ?></option>
<?php 
} while ($statuslist = mysql_fetch_assoc ($status_set)); 
?></select>
    <span class="compuls">*</span></td>
  </tr>

 

 

I have been working on this and  I have set a blank selection in my drop down lists o zero,  therefore if I can omit any fields with zero I will not update the drop down lists that have not been selected this time. Therefore if I have a function in my form processing to omit zeros

 

Is this an option,  I hope I am thinking along the right lines?

 

 

 

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.