By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,967 Members | 1,684 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,967 IT Pros & Developers. It's quick & easy.

Multiple select issue

P: 1
Hi, i would sen multiple select to mysql by form, my prb is:
file connect.php

$service =$_POST['service'];

@mysql_select_db($db) or die( "Can't connect to db now");
$query = "INSERT INTO multi VALUES ('','$_POST[val_form]','$_POST[service]')";

file insert.php

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Documento senza titolo</title>

<form action="connect.php" method="post">
<select name="val_form[]" size="4" multiple>
<option value="colloqio" >colloqio</option>
<option value="questionari chiusi" >questionari chiusi</option>
<option value="questionari aperti" >questionari aperti</option>
<option value="tesina-project work" >tesina-project work</option>
<select name="service[]" size="4" multiple>
<option value="patrocinio" >Patrocinio</option>
<option value="progettazione" >Progettazione</option>
<option value="valutazione" >Valutazione</option>
<option value="docenti" >Docenti</option>
<input type="submit" value="Insert record">


was send on mysl:

ID Val_form service
20 Array Array

some help please?

Read the Posting Guidelines at the top of this forum before you continue!
Especially the part about enclosing code within php or code tags!!

Feb 28 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.