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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.