[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

PHP - MySQL

Posted on 2011-02-26
2
Medium Priority
?
253 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
[X]
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
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

Industry Leaders: 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

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

649 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