how do I insert the data for a radio button a user selects?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your question is not 100% clear to me, do you wanna know how to save a radio button input to a database or how to setup something where a user clicks a radiobutton and based on the selection he must fill out a form?
Assuming your HTML for your radio button is like this:
You can save that to your database by:
If you submit different fields based on the radiobutton that is selected you can just use:
EDIT //
Based on your HTML FORM you can use the code below to insert the values into your database: