How do I Connect a website in MySql?
Published: July 5, 2009

Question:
How do I Connect a website in MySql?

Answer:
If you want to connect your website to a MySQL database. There are a number of steps.

  1. You must make sure your hosting company offers that service and that you have that feature on your current hosting account.
  2. You must create the database with a user name and password. You can manipulate your database(s) using a program called phpMyAdmin. This is usually provided by your host company.
  3. Youmust use a scripting language to connect with. Usually of you are using MySQL then the language will be PHP.
  4. You then create the php page and upload it up to your sever.
  5. The following sample will allow you to connect your php page to the database. It does NOT do anything else other than connect. There are too many other variables on the type of table created and what you may want to do to show a general example.

Example:
<?php

//Usually this is localhost. But could be an address of the database server
$HostType = "locahost";

//Name of your database
$DatabaseName = "SomeName";

//Your database username
$DbaseUsername = "SomeUsername";

//Your database password
$DbasePassword = "SomePassword";

$db=mysql_connect($HostType,$DbaseUsername,$DbasePassword);
mysql_select_db($DatabaseName,$db) or die ("cant change");


//code to manipulate the data base

?>

About the Author
Rich Agnew is an author for The Computer Geek Custom Web Page Design. The Computer Geek is a web design company that prides itself in professional service at a fraction of the cost. The Computer Geek specializes in Custom Web Design, PHP & MySql and Ecommerce.

Customer Reviews:

Richard (The Computer Geek) has been extremely pro
Richard (The Computer Geek) has been extremely prompt with his replies, honest, very cordial, and most importantly, gets the job done quickly and professionally - a dream come true. He fixed my website in a day and I am so grateful. I've dealt with developers who charge an arm and a leg, but his fees are very fair. I've felt very comfortable working with Richard, and highly recommend him without any reservation.
Cynthia Yi
Published:
Cynthia Yi
cyi320@yahoo.com
Small town, small cemetery with a board of volunte
Small town, small cemetery with a board of volunteers that are not computer savvy! Computer-Geek and Rich Agnew got our website cleaned up, updated and working fantastically! Fixed website up in a very short time, was extremely reasonable, and was very pleasant to deal with! Highly recommend !!!
Jane Neufeld
Published:
Jane Neufeld
delawarecemetery@gmail.com
What a relief to know that there is a trusted reso
What a relief to know that there is a trusted resource to get your website back up and running in an emergency. The Computer Geeks quickly diagnosed and corrected the problem and had our website up and running in short order. I highly recommend The Computer Geek Company and would not hesitate to use their services in the future.
Donna Roth
Published:
Donna Roth
donna.vvinyl@gmail.com
I've built and managed my websites for several yea
I've built and managed my websites for several years but recently reached a point where my website was running so slowly that I had no idea where to turn. I discovered the Computer Geek website and took a chance of trusting the other great reviews there. I met Rich through the chat service on the site and he was very responsive. Within an hour of him having access to my site, he was working on the problem. He improved my site speed and identified the next steps I would need to improve the speed substantially. I highly recommend this service! Quick response, knowledgeable, reasonable rates, and available on an as-needed basis (no contract). I now have a "computer guy"! Thanks, Rich!
Shirley Alarie
Published:
Shirley Alarie
shirleyalarie@gmail.com
Very fast, professional service with excellent com
Very fast, professional service with excellent communication throughout. Service exceeded my expectation, and the end result was just what I needed.
Oliver Harris
Published:
Oliver Harris
oliharris801@hotmail.com
My large Drupal 8 site was down for 5 days. I cont
My large Drupal 8 site was down for 5 days. I contacted Rich on a Friday evening at 2200 hrs CET, provided the access codes and less than 30 minutes later it was fixed. I have been online since 2003 and I have never seen work like this, Rich is a true Pro and I will definitely recommend Computer Geeks to all friends and colleagues. Many thanks, Jeremy - UK
Jeremy Insole
Published:
Jeremy Insole
jeremy@interyachtcharter.com
We were in a pinch and needed a new website built
We were in a pinch and needed a new website built fast. We stumbled upon The Computer Geek and reached out to them for a consultation. After the first call we felt it was a no brainier to go with them to build our site. The professionalism was second to none. Rich and his team built our new site with lightning speed and provided exceptional communication. We love the new website! Thank you for your professionalism, amazing communication, and always going above and beyond for us. We look forward to working with you in the future.
Keith BERARD
Published:
Keith BERARD
keith.berard@gmail.com
heck.. I sell car parts.. make special car parts v
heck.. I sell car parts.. make special car parts very, very well...... BUT.. I'm pretty bad when it comes to being a computer guy.. I just don't know.. don't have the time.... and till now our oscommerce sites were increasingly not really being maintained.. I NEEDED HELP.. BUT . WHO DO YOU TRUST..?? Somehow I found Rich.. MY ADVICE is don't look around.. get onto Rich.. be polite.. his bills are ok.. and his service excellent. 5 star.
Dave Clee
Published:
Dave Clee
pwdistribution@gmail.com
I do not often write reviews however I felt I shou
I do not often write reviews however I felt I should with Computer Geek. I have a fair knowledge of servers and php code that I have built up since 2003. I had spent some days trying to get a new bit of stock control software to work. Having narrowed down what was causing the problem and with a few alterations managed to bring the entire site down. I am laughing about it now but 20 minutes ago I was almost sick. Having spent an hour trying to fix it or undo the damage with no success, I contacted Richard and within 2 minutes the site was up and running and within 10 minutes the bit of software I had been trying to get to work now works. Thank you again Richard
James ORourke
Published:
James ORourke
sales@earth-systems.co.uk
Due to the positive experience we had with Mr. Ric
Due to the positive experience we had with Mr. Rich Agnew project manager, I am writing this unsolicited strong recommendation on behalf of Mr. Rich Agnew who is a project manager at The Computer Geek Company. It is a genuine pleasure to write this unsolicited letter for Mr. Rich Agnew, who is an exceptional and talented person who has repeatedly helped us with our website that stop working with Go Daddy. Before meeting and talking to Rich Agnew, we had a horrible experience with trying to find assistance in repairing our website. No one would help, they wanted to rebuild the entire website for thousands of dollars, their estimate of costs was so unreasonable we were just going to shut down the website, we felt we could not trust anyone because of what seemed to us was smoke and mirrors, and a lack of follow-up on calling us back. Despite not knowing Mr. Rich Agnew for only a brief time, I can firmly say in all the 40 years of my practice, Rich has been consistently trustworthy with his judgment and exceptionally speedy with the completion of the project. I feel I can apply a reliable yardstick in assessing Rich, especially since I was a Professor in the Doctoral Program at Nova University School of Professional Psychology for over 12 years. I have published over 40 scientific articles, written a book, have been in practice for over 40 years as a licensed psychologist in the state Florida, I have been a member of over 15 insurance networks in which I specialize in the treatment of children, adults, seniors and cancer patients. Finally, at the age of 69 you can imagine how many issues I have dealt with in my life and homes. Rich is the first project manager I have ever written an unsolicited letter of recommendation. In our transactions with Rich Agnew, he has always impressed us with his expertise, competence, and his handling difficult problems. He provided all the options, recommended the best option, and carried through the project better than we expected; this is extremely rare in our society. He is mature, handled all the computer and website problems, he is dedication and has excellent corporate skills; he is caring and has an exceptional high ethical standard. I may regret ever saying all this because then he will be moved. I highly recommend Rich Agnew without any reservations. Furthermore, I know we will be contacting him yet again because of his superb excellence and honesty.
Grant A. Killian, Ph.D.
Published:
Grant A. Killian, Ph.D.
grant@killianphd.com
[Read More Testimonials Here]

Latest Website Related Articles

How Long Does it Take to Make a Website

Published: August 11, 2020
When you're starting to think about getting a website made for you or your business, one of the most important things to consider is the timeline. Depending on how you go about getting your site built the timeline can be very different. If you ...[Read More]

 

How Much is a Website

Published: July 26, 2020
When you own or manage a business, having a website can be a great tool for growing your client base and getting more people to discover you. But what holds lots of people back from getting a site is the cost, as it can sometimes seem overwhelm...[Read More]

 


Here are some links to related topics:
 secure websites,   skuvault consultant,   oscommerce master,   fatcow hacked,   small orange hacked,   zen cart hacked,  


Site Secured By The Website Guardian