Computing.Net > Forums > Web Development > Form to MySQL Database - Need help!

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Form to MySQL Database - Need help!

Reply to Message Icon

Name: brds
Date: March 11, 2007 at 12:48:23 Pacific
OS: Windows XP
CPU/Ram: 512
Product: Dell
Comment:

I have a form that uses method="get" and then action = "post.php". I'm trying to move the data that was entered into the form from the post.php into a db i have set up on my website. I have absolutely NO idea how to do this.

So far, the only php code i have done is:

<?php
$username = "u70383618";
$password = "letmein";
$hostname = "MYSQLHOST";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to the MySQL Host.");
print "Successfully connected to the MySQL Host.
";
$selected = mysql_select_db("d60350713",$dbh)
or die("Unable to connect to MYSQL database (d60350713).");
print "Successfully connected to the MySQL database (d60350713)";

mysql_close($dbh);
?>

So pretty much, i can connect to the MySQL host and the database itself. I've googled a bunch to try to find something that would help, but i can find anything. I need to find the commands that will post the form items into the MySQL DB. If somebody could help me out (or point me in the right direction), it'd be greatly appreciated.



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: March 12, 2007 at 08:37:41 Pacific
Reply:

Data is inserted and extracted from a database using queries. There is way too much information to explain it within a forum. Do a search for "PHP MySQL Tutrial" to find something that works for you. Then post back with any specific questions.

Michael J


0

Response Number 2
Name: rhi
Date: March 15, 2007 at 06:54:06 Pacific
Reply:

just visit hotscripts.com or php resource index, download a sample free db related script and see yourself how to do it.

rhi

Get your free web hosting here


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


web page not opening Form to email page link.....



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Form to MySQL Database - Need help!

Adding Form to Webpage www.computing.net/answers/webdevel/adding-form-to-webpage/952.html

ODBC connect to web database www.computing.net/answers/webdevel/odbc-connect-to-web-database/2992.html

Querying a row from MySQL database with PHP www.computing.net/answers/webdevel/querying-a-row-from-mysql-database-with-php/4094.html