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

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

816 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

8 Experts available now in Live!

Get 1:1 Help Now