Solved

PHP - MySQL

Posted on 2011-02-26
2
242 Views
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.

Regards,
Raul
0
Comment
Question by:raulmonda
2 Comments
 
LVL 5

Accepted Solution

by:
Ultra_Master earned 500 total points
Comment Utility
Have a look here as it is explained very nice:
http://www.w3schools.com/PHP/func_mysql_connect.asp

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.

0
 

Author Closing Comment

by:raulmonda
Comment Utility
thank you very much.

Regards
Raul
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now