close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Need a single MySQLi drop down select list to insert multiple columns from one table into a form

Thread began 9/29/2014 7:27 am by Jason | Last modified 9/29/2014 12:43 pm by Jason | 7448 views | 20 replies

Jason

Need a single MySQLi drop down select list to insert multiple columns from one table into a form

This is a drop down that I currently have, and it's working fine.

<td width="398"><label for="Event">Event:
<select name="Event" id="Event">
<?php
while(!$Event->atEnd()) { //dyn select
?>
<option value="<?php echo($Event->getColumnVal("id")); ?>"<?php if (!(strcmp($Event->getColumnVal("id"), ($Event->getColumnVal("id"))))) {echo "selected=\"selected\"";} ?>><?php echo($Event->getColumnVal("event")); ?></option>
<?php
$Event->moveNext();
}
$Event->moveFirst(); //return RS to first record
?>
</select>
</label></td>



However, I need to insert the values from 2 other columns (start_time & end_time) in this table that correspond with the selected record when the form is submitted. I want those values to be hidden but they need to change along with the selected value in the drop down.

How can I do that?

The query is:

<?php
$Event = new WA_MySQLi_RS("Event",$local_i,0);
$Event->setQuery("SELECT kids_program_events.* FROM kids_program_events");
$Event->execute();?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...