Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 04-15-2012, 05:56 PM   #1
Beta Member
 
sanso13527's Avatar
 
Join Date: Apr 2012
Posts: 4
Default 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
__________________

sanso13527 is offline   Reply With Quote
Old 04-20-2012, 10:18 AM   #2
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,007
Default 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.
__________________

__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 04-20-2012, 03:22 PM   #3
Beta Member
 
sanso13527's Avatar
 
Join Date: Apr 2012
Posts: 4
Default

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 ?
sanso13527 is offline   Reply With Quote
Old 04-26-2012, 10:40 AM   #4
Baseband Member
 
engrmudasir's Avatar
 
Join Date: Dec 2011
Location: Pakistan
Posts: 23
Default Re: Php mysql

I think the quoted example is great, You just need to understand and clarify it to Implement this in your example.
engrmudasir is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 04:14 AM.


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