pbaker127 Posted January 28, 2010 Share Posted January 28, 2010 i have a form which i want the user to able to select multiple answers. But i want the answers to be stored into a single field on the mysql table in the back end. e.g the user may select red + blue + green and so in the field i want it to show red,blue,green. is it best to list the options in like an array or how do i do this as i dont do much PHP and so am a bit rusty. hope you can help Link to comment https://forums.phpfreaks.com/topic/190172-single-values-into-sql-field/ Share on other sites More sharing options...
schilly Posted January 29, 2010 Share Posted January 29, 2010 well use checkboxes then loop through and concatenate each value together with some kind of separator "-" "_" or whatever. so you would have red-blue-green etc. store than in the db then if you need to output that data just use the explode fn on your separator character. Link to comment https://forums.phpfreaks.com/topic/190172-single-values-into-sql-field/#findComment-1003387 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.