PHP script to write to database

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jamiegraham6
Forum Newbie
Posts: 1
Joined: Mon Oct 17, 2005 4:43 am

PHP script to write to database

Post by jamiegraham6 »

I am just wondering if anyone knows how to make a script for a php code to write to a database. Basically what I want is have a few fields that request information and then I want it to submit to a mysql database. I also would like to have a script that will export information from the mysql database. Can someone help me with this please? Thanks.

Jamie
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

use a html form to post data to a php page, then you can run queries through mysql with php

look at:

mysql_connect()
mysql_select_db()
mysql_query()

and don't forget the essential mysql_error() for error reporting!

read those functions on the php manual http://www.php.net and if you still have questions post some examples of stuff you are trying.
Hardcore4Life
Forum Newbie
Posts: 14
Joined: Mon Oct 10, 2005 7:58 am
Location: Hannover / Germany
Contact:

Post by Hardcore4Life »

Hi!

I think you should search a php manual first cause all you need are basic features in php! :D
For example take a look at this!
Last edited by Hardcore4Life on Mon Oct 17, 2005 5:13 am, edited 1 time in total.
Post Reply