Posted on 2011-02-26
Last Modified: 2012-05-11
hi experts,

im trying to make a register code for my small project and i come to the point where i need to conect to my web hosted database. im using PHP coding (as newbie, of course). i found many tutorials but i dont know how to use the following coding line:

mysql_connect("localhost", DATABASE, "PASSWORD") or die(mysql_error());

Open in new window

what should i use instead of "localhost" and DATABASE?

Any help in this matter will be highly appreciated.

Question by:raulmonda
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

Ultra_Master earned 500 total points
ID: 34988543
Have a look here as it is explained very nice:

Note that you can let localhost as the server when you upload your script to the server and only put the database name and the password to connect to it.


Author Closing Comment

ID: 34988593
thank you very much.


Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question