Forums
This topic is locked
List Menu multiple fields
Posted 25 Apr 2006 16:58:17
1
has voted
25 Apr 2006 16:58:17 Scott Mason posted:
Can anybody shed some light on this minor problem. I have a form, one of the fields has a list menu with 20 or so values.
The user can fill out the form and select one or more of the values from that list menu.
My problem is that if the user selects more than one value, only one value gets inputed into the database. How do I get more than one value from the list menu into the database.
I use phpmyadmin to access the database. Is it something to do with the "type" column in the table. At present it is set up as VARCHAR for that field.
If you need to see the site to see what I mean here's the link.
www.scottmason.co.uk/rnrf/main/members/login_database.php
Username - member
password - member
many thanks
Scott
Replies
Replied 27 Apr 2006 17:29:44
27 Apr 2006 17:29:44 Roddy Dairion replied:
Did it work?
Replied 27 Apr 2006 17:54:29
27 Apr 2006 17:54:29 Scott Mason replied:
sorry roddy, had to go out, i'll try it now
Replied 27 Apr 2006 18:14:29
27 Apr 2006 18:14:29 Scott Mason replied:
no it didn't work, I just got a blank screen this time
Replied 27 Apr 2006 18:22:10
27 Apr 2006 18:22:10 Roddy Dairion replied:
Da prob is dat i can test it properly. If u hve msn can u add me its
$topic1_results = "ALL";
if (isset($_GET['topic'])) {
$topic1_results = (get_magic_quotes_gpc()) ? ."%".$_GET['topic']."%". : addslashes(."%".$_GET['topic']."%"
}
$topic1_results = "ALL";
if (isset($_GET['topic'])) {
$topic1_results = (get_magic_quotes_gpc()) ? ."%".$_GET['topic']."%". : addslashes(."%".$_GET['topic']."%"
}
Replied 27 Apr 2006 18:39:53
27 Apr 2006 18:39:53 Roddy Dairion replied:
Ok had a close look at it.
$topic1_results = "ALL";
if (isset($_GET['topic'])) {
$topic1_results = (get_magic_quotes_gpc()) ? ("%".$_GET['topic']."%" : addslashes("%".$_GET['topic']."%"
}
$topic1_results = "ALL";
if (isset($_GET['topic'])) {
$topic1_results = (get_magic_quotes_gpc()) ? ("%".$_GET['topic']."%" : addslashes("%".$_GET['topic']."%"
}
Replied 27 Apr 2006 20:33:44
27 Apr 2006 20:33:44 Scott Mason replied:
hoorah, it works!!!
Roddy thank you so much for your patience, this is what this forums all about, great.
As you've probably guessed i'm more a designer than a developer so if i can do anything for you, please just ask.
Roddy thank you so much for your patience, this is what this forums all about, great.
As you've probably guessed i'm more a designer than a developer so if i can do anything for you, please just ask.