PDA

View Full Version : php/mysql help?


geoadmin
08-17-2001, 02:34 PM
Hi all,
Can someone tell me how to connect to the mySQL db on HR servers from php scripts from my site? I know this is a newbie question, but i'm losing alot of hair trying to figure this out on my own. Thanks

Darin
08-17-2001, 02:39 PM
http://www.php.net/manual/en/ref.mysql.php ' nuff said. :)

geoadmin
08-17-2001, 04:18 PM
Thanks Darin,
I've seen the manual, read it (relevant parts of it) but i'm just stuck. I'll try the link and go from there. Thanks again.

George

Darin
08-17-2001, 04:45 PM
I read that part about 10 times didn't understand a thing, until I actually started playing around with it. Now it does exactly what I want. :)

DCE
08-17-2001, 05:06 PM
Try like this

$dbcon = mysql_connect("db_name","username","password") or die ("nup its not working");

Then use the $dbcon variable where ever you need to connect

geoadmin
08-17-2001, 05:12 PM
Thanks DCE and Darin,

Got it figured out!

George