Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 18th, 2007, 06:36 AM
Registered User
Join Date: Dec 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Php transfering data to mysql

Can you tell me how the input data received from html tags as input will transfer to mysql database.

Reply With Quote
  #2 (permalink)  
Old December 26th, 2007, 05:22 AM
Authorized User
Join Date: Mar 2005
Location: , , India.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to pritz Send a message via Yahoo to pritz

Hi gaurava,

I hope you understand the how client server talks and exchange info with each other .
When you post your information the PHP receive it in $_POST superglobal array .In PHP you use we use following LOC to insert data

mysql_query('insert into table(id,name)values(1,$_POST['name'])

This is how data posted from html form is inserted in mysql table.

Reply With Quote
  #3 (permalink)  
Old January 5th, 2008, 07:33 AM
Registered User
Join Date: Jan 2008
Location: Sylhet, , Bangladesh.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

It will be in brief:
$sql="insert into mytable ('name', 'phone') VALUES($name,$phone)";
$result=mysql_query($sql) or die(mysql_error());


Reply With Quote

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP-MySQL Insert Data problem forexen PHP Databases 1 March 13th, 2007 12:58 AM
Transfering data from csv file to data base g_vamsi_krish ASP.NET 1.0 and 1.1 Professional 2 May 16th, 2006 11:58 PM
manipulating data in mysql using php - countries phpnukes BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 January 24th, 2005 01:35 AM
Transfering data from one machine to another..... nikosdra SQL Server 2000 0 September 6th, 2003 05:08 AM
Editing MySQL data from a PHP form cmiller Beginning PHP 2 September 2nd, 2003 05:11 PM

All times are GMT -4. The time now is 03:52 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.