Php mysql

sanso13527

Beta member
Messages
4
hello sir, i had a problem in php add data form.

how can i use check box for add data to mysql database
 
you use th code

<input type=checkbox name="check1" value="1">

the on the PHP page you need to use
vars = $_POST['check1'];

to retrieve the data.

you should probably practice using form elements on an HTML page first and pass those form elements to a PHP page (recieve them using $_GET or $_POST depending on your form method).

wait until you're properly comfortable with using html forms and the get and post methods, and retrieving sent data with your PHP page. THEN you need to start thinking about a database.

the exact SQL you use to put the data into your database will depend on your database design.
 
I have familiar with pho MySQL and HTML but first time I try to using check box to add data using php so can u give a sample coding ?
 
Back
Top Bottom