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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.