| ||||||||||||||
| ||||||||||||||
Html / PHP form into MySQL DB Posted by Chris_Isaac (Chris Isaac), 19 March 2004 HiI've got the following snippet of my script which does what it should, ie, get a multiple select from a drop down list: Code:
The following bit of PHP then grabs the values concerned: Code:
Now from that if you were to print $type you get the result you would expect, eg, : Quote:
in this case 2 options, seperated by comas. The problem is when I try to inset into a mysql db using the following, it only puts in the fist option: Code:
Can you see where I'm going wrong? PS, the table entry for type is : set ('Action', 'Comedy', etc etc); Posted by admin (Graham Ellis), 20 March 2004 Can't see it straight off. Have you tried running the SQL update manually through a mysql client? I suspect that would give you (and me!) some further clues.Posted by Chris_Isaac (Chris Isaac), 20 March 2004 Right, I run the following query directly, but had the same results, ie, only 1 entry was accepted:Code:
I've also tried variations of the above but can't get it to work, so I guess what I need to know is how to update a SET field ?? I've tried the online manual, but no help, any clues? Posted by admin (Graham Ellis), 20 March 2004 OK ... the "set" string in space sensitive and I think I spotted a space in front of your Comedy? Here's an example that works:Code:
Posted by Chris_Isaac (Chris Isaac), 20 March 2004 Thats cured it.Thanks again. This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| |||||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |