Page 1 of 1

PHP script to write to database

Posted: Mon Oct 17, 2005 4:51 am
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

Posted: Mon Oct 17, 2005 5:11 am
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.

Posted: Mon Oct 17, 2005 5:11 am
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!