Jump to content

Please help very inept programmer! - connection problems


Fearpig

Recommended Posts


Hi guys any help with this would be appreciated.... I'm just starting out in PHP and I have a webserver with IIS 6, PHP and MySQL. I've set up a database with 1 table and I'm trying to pull some very basic data out but I'm having problems establishing a connection.

Here are the details and the error message. Can anyone see the problem or suggest a way to start checking things?

Database: TelephoneList
Table: TelephoneNumbers
Username: root
Password: password


Here's my PHP page:

<html>
<head>
</head>
<body>
<?php

$db = mysql_connect("localhost", "root", "password");

mysql_select_db("Telephonelist",$db);

$result = mysql_query("SELECT * FROM telephonenumbers",$db);

printf("First Name: %s<br>\n", mysql_result($result,0,"first_name"));

?>
</body>
</html>

...and here's the error it gives:

Fatal error: Call to undefined function mysql_connect() in D:\Intranet v3\php_telephone_list\index.php on line 7


Cheers guys!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.