Computer Forums

Computer Forums (http://www.computerforums.org/forums/)
-   Web Programming (http://www.computerforums.org/forums/web-programming/)
-   -   Php mysql (http://www.computerforums.org/forums/web-programming/php-mysql-216856.html)

sanso13527 04-15-2012 04:56 PM

Php mysql
 
hello sir, i had a problem in php add data form.

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

root 04-20-2012 09:18 AM

Re: Php mysql
 
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.

sanso13527 04-20-2012 02:22 PM

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 ?

engrmudasir 04-26-2012 09:40 AM

Re: Php mysql
 
I think the quoted example is great, You just need to understand and clarify it to Implement this in your example.


All times are GMT -5. The time now is 09:35 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0