Jump to content

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?

 

 

 

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.