954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Another newbie Q&A

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?

porchy33
Newbie Poster
3 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

Can someone help?

porchy33
Newbie Poster
3 posts since Aug 2005
Reputation Points: 10
Solved Threads: 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.

Catweazle
Grandad
Team Colleague
4,335 posts since Mar 2004
Reputation Points: 229
Solved Threads: 149
 

Thanks.

porchy33
Newbie Poster
3 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

Ouch, a simple typo...

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

should be

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

sarahk
Junior Poster
144 posts since Apr 2005
Reputation Points: 10
Solved Threads: 1
 

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.

otr
Newbie Poster
1 post since Oct 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You