FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


mysql_connect()





Ghost Face
Does anyone know what the default values would be inside of this function? or should I just use mysql_connect()? Thanks.
Code:
The mysql_connect() Function
The syntax below shows a simple way of opening a MySQL connection.

Syntax
mysql_connect(server,user,password);

Info from w3schools.com
mathiaus
server would be localhost, username would be the username for the database same with the password. If using mysql installed yourself on your PC or something, username would be root and the password would be left empty
Ghost Face
Lol, nevermind. I figured it out, but thanks anyway Smile

Now, a new question! How do I view it? I'm using frihost.

Much thanks.
kv
I don't understand what you mean by "view it", but if you are refering to viewing your database contents, you can do it using "phpmyadmin" in your cpanel.
fiendskull9
for people who see this wanting to know how it works,

you will need to define server and such in a config file (or even the same file)

ex. -

server = "localhost"
user = "billy"
password = "haxor"

---------------

if this were in a file called config.php, you would have to invoke the include command in the file that connects. (perhaps dbconnect.php that alot of scripts use, to save time in typing, and if they screw something up, they change only one file, not 3 or 4)

-clay
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.