Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0
This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 11th, 2005, 05:28 PM
Registered User
 
Join Date: Apr 2005
Location: Denver, CO, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to preston2003
Default Submitting multiple selection to mysql DB

select name="task_7[]" multiple>
        <option value="NONE">NONE</option>
        <option value="ALL">ALL</option>
        <option value="ALL CHE">ALL CHE</option>
        <option value="ALL PTK">ALL PTK</option>
        <option value="CENTRAL">CENTRAL</option>
        <option value="CHE C/W">CHE C/W</option>
        <option value="CHE E/N">CHE E/N</option>
        <option value="CORR_NTH">CORR_NTH</option>
        <option value="CORR_REG">CORR_REG</option>
        <option value="CORR_STH">CORR_STH</option>
        <option value="EAST">EAST</option>
        <option value="LUNCH">LUNCH</option>
        <option value="NORTH">NORTH</option>
        <option value="PROJECT">PROJECT</option>
        <option value="PTK C/N/R">PTK C/N/R</option>
        <option value="PTK E/W">PTK E/W</option>
        <option value="REGIONS">REGIONS</option>
        <option value="RIDE_OUT">RIDE_OUT</option>
        <option value="TRAINING">TRAINING</option>
        <option value="WEST">WEST</option>
        </select>
------------------------------------------------------
$query = "insert into table_name values ('".$task_7."', '".$task_8."')";
$result = $db->query($query);
if ($result)
     print $db->affected_rows. ' Schedule added into database. ';

$db->close();
-------------------------------
Data is posted but only one selection is posted from the form.
Reply With Quote
  #2 (permalink)  
Old May 11th, 2005, 11:06 PM
Friend of Wrox
 
Join Date: Apr 2005
Location: Cochin, , India.
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

If the you MySql version supports IN operator
This link could be helpful,

Look for "How to insert multiple values using single Query "
at http://prashantprof.blogspot.com

Prashant





Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Multiple selection DropDown surendran ASP.NET 2.0 Basics 1 September 26th, 2008 07:49 AM
DropDownList not submitting to db RubyRue ASP.NET 2.0 Basics 6 October 3rd, 2007 05:48 AM
Multiple Selection of Listbox jasminecyriac ASP.NET 2.0 Basics 0 June 22nd, 2006 05:20 AM
Submitting a form after a calendar date selection programmher Javascript How-To 2 August 2nd, 2005 06:02 PM



All times are GMT -4. The time now is 09:42 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.