?
Solved

PHP - MySQL

Posted on 2011-02-26
2
Medium Priority
?
255 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 2000 total points
ID: 34988543
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
ID: 34988593
thank you very much.

Regards
Raul
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this article, we’ll look at how to deploy ProxySQL.
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 dynamically set the form action using jQuery.
Suggested Courses
Course of the Month14 days, 19 hours left to enroll

839 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