Page 1 of 1

How to pass multiple values to a DB from a box selection

Posted: Tue Jan 14, 2003 1:42 pm
by boboli
Thank you in advance.....

Hi all...I hope you will understand my explanation (sorry I'm an italian newbie....)
I have a form (not yet online...) to manage the formations of a fantasy italian soccer league....with several selection boxes...basically it works like this:

I have a box for the available defenders (for a total of 8) and the team manager can decide to move (with javascript) them from the "available" to a second box where the form will show the defenders that are going to play that week (from 3 to 6 defenders).....
The selected defenders are now in a variable named $dt....

NOW I need to send the players stored in the $dt variable into my DB (mysql) as separate values.....
BUT I have no ideas from where to start.......

Please help me !!! Thanx a lot
Roberto

Posted: Tue Jan 14, 2003 1:57 pm
by volka
viewtopic.php?t=4396 might be helpful

try this code

Code: Select all

<html><body>
<pre><?php print_r($_POST); ?> </pre>
<form method="POST">
	<select name="sel[]" multiple="true">
		<option value="a">first</option>
		<option value="b">second</option>
		<option value="c">third</option>
		<option value="d">fourth</option>
	</select>
	<input type="submit" />
</form>
</body></html>