Read and Save only Checked Radio Button to a "particular column in MYSQL" | PHP & Ajax

Technologies Used:

  • Server Side: PHP
  • Client Side: Ajax to call PHP
  • Client Side: HTML
  • Usable on: Phonegap

I have four radio button in a Radio Group in HTML

  1. Mother
  2. Father
  3. Self
  4. Others

The MySQL DB columns are like:

  1. DBMother
  2. DBFather
  3. DBSelf
  4. DBOthers

If i choose Mother Radio button, the value should go and save right under the column DBMother, rest of the columns should remain blank.
When i choose Radio Button Self in HTML, the value should go and save right under Mysql DB column DBSelf and remaining columns should remain Blank.

I am using PHP on Server Side, and i am using Ajax to call PHP from Client side.

I have tried a few codes available on google, but these are for saving information in one single DB Column.

I Think i need codes for PHP for server side and Ajax for Client side.

Source: php

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.