Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL 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 March 25th, 2004, 10:53 AM
Registered User
Join Date: Mar 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default writing to a database

i have a database called customers. i want to create a form which passes the data into the customer database.
i think below is the correct code for sending the data. but where do i place this code on my form.
thanks in advance


/* Connecting, selecting database */
$link = mysql_connect("localhost", "233560", "233560")
   or die("Could not connect : " . mysql_error());
mysql_select_db("db_233560") or die("Could not select database");

// Input info to table
 $query = "INSERT INTO customers VALUES('" . $pagefrom . "','" . $first_name . "','" . $last_name . "','" . $delivery_address . "','" . $billing_address . "','" . $purchase_quantity . "','" . $comments . "')";

print $query; //Copy and execute the query in MYSQL db, that resulted
              //in the above print and see if that inserts data

//Close db

Reply With Quote
  #2 (permalink)  
Old March 25th, 2004, 11:10 AM
Registered User
Join Date: Mar 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

not to worry, solved it

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
Writing to Database Scripts82 ASP.NET 1.0 and 1.1 Professional 8 September 15th, 2006 07:47 AM
Trouble writing database MDrumm Classic ASP Databases 5 August 4th, 2005 03:27 PM
Writing to Database - Please Help Dwizz VB.NET 2002/2003 Basics 12 May 11th, 2005 08:37 AM
Writing data to database cdenequolo Classic ASP Databases 2 August 17th, 2004 08:00 PM
Writing to an external database scottiegirl MySQL 4 March 2nd, 2004 04:02 PM

All times are GMT -4. The time now is 04:45 PM.

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