How to check a radio button using database content
Create a simple php page that loads the list of users information with name and sex.if value exist in the database with ‘1’ as Male and ‘0’ as Female. Please follow the following steps Step1: create a database called “test”. create a table called “tbl_user_information” using the below query
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
CREATE TABLE IF NOT EXISTS `tbl_user_information` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(250) NOT NULL, `sex` tinyint(2) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -- Dumping data for table `tbl_user_information` -- INSERT INTO `tbl_user_information` (`id`, `name`, `sex`) VALUES (1, 'vasanthan', 1), (2, 'sudhina', 0); |
Step 2: create file called… Read More »