0

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?

4
Contributors
5
Replies
6
Views
12 Years
Discussion Span
Last Post by otr
0

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.

0

Ouch, a simple typo...

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

should be

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.