Hi, I'm new to php and am trying to connect to mysql like this:

<?php
$conn = msql_connect("localhost", "user", "password");
echo $conn;
?>

But when i do I get this:

Fatal error: Call to undefined function msql_connect() in C:\www\PHP_mysql\testconn.php on line 2

I wonder why?

Can someone help?

Hi porchy and welcome to Daniweb :D

I've moved this topic to the appropriate forum section for you, where I'm sure it will receive some assistance.

Thanks.

Ouch, a simple typo...

$conn = msql_connect("localhost", "user", "password");

should be

$conn = mysql_connect("localhost", "user", "password");

hmm.. i think it's an area for me .. even if I am not that new to PHP.

I've setup a few forums and I get all kinds of errors.. for some reson ... I don't understand .. all looks good.. localy everything works just fine.

Please look at the rrors and let me know if you ppl can help.

www.gsm-news.com
www.katavia.net
www.open-health.net
www.paintballmode.com


Thanks ppls.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.