fatal error: undefined call to function mysql_connect()

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Locked
beckbapegeneral
Forum Newbie
Posts: 19
Joined: Mon May 08, 2006 8:59 pm

fatal error: undefined call to function mysql_connect()

Post by beckbapegeneral »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


i was coding my php connection yesterday and i get the error mention above.

connection.php

Code: Select all

<?php
$conn = mysql_connect('localhost','username','password') or die (mysql_error());
mysql_select_db('pms');
?>

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the MySQL extension isn't loaded. Check your phpinfo(), your php.ini and make sure you are using the correct versions of the libraries required.

...and you've got another thread on this subject already. Stick to that thread please.
Locked