Jump to content

Connecting to Db from PHP script


prcollin

Recommended Posts

If i upload all my php files to my main directory on my web domain how do i connect to my db that is created in mysql do I need to somehow upload the db somewhere or??/  I am new

 

I created a form that is supposed to store all information including user names and passwords and created a db that should work now i need to get the two working together

Link to comment
https://forums.phpfreaks.com/topic/58706-connecting-to-db-from-php-script/
Share on other sites

First of all your form fields need to be matched to the database itself.  You will need to identify each field on the form with a position in the database and set its properties correctly.  You can find a list of properties here http://help.scibit.com/Mascon/masconMySQL_Field_Types.html then once you have done that you may want to look at a tutorial that will help you make pages in php that connect to the database and store information, retrieve information etc.  That is only the beginning.  If you have something that you are allowing other users to log into the site with then you need to create an authentication system for your pages and if you are just storing these user names and passwords for yourself then it dosent matter that should do it for you.  Here are two such tutorials that helped me out building my first PHP connection to MySQL.  Wish I could help you more but I am very new myself to PHP and MySQL up untill about 6 weeks ago I never opened a php page and never used MySQL either.  If you still have problems come on back there are some very knowledgeable peolple here that have helped me a time two already.

 

http://www.freewebmasterhelp.com/tutorials/php/

 

http://www.tizag.com/mysqlTutorial/

 

~Chad

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.