View Single Post
  #1 (permalink)  
Old October 14th, 2005, 12:20 PM
arimakidd arimakidd is offline
Authorized User
Join Date: Mar 2005
Location: arima, West Indies, Trinidad and Tobago.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to arimakidd
Default Undefined Function Error

I am building this script step by step and the first step is not working. Simply to connect to mysql, here's the code:
$connect = mysql_connect("localhost","root","newman$") or
die ("Hey loser, check your server connection.");
echo "if you gotten this far it means things worked out";
Instead I get the following error:

Fatal error: Call to undefined function mysql_connect() in C:\apache\Apache2\development\mysql_up.php on line 11
Line 11 is as follows:
$connect = mysql_connect("localhost", "root", "newman$")
My OS is xp pro and I have successfully installed apache and php5. Mysql works fine at the command prompt. The script I am writting is in php and the entire thing is simple and short:
$host = "localhost";
$user = "root@localhost";
$pass = "newman$";
//connect to MySQL; note we've used our own parameters - you should use 
//you own for hostname, user, and password
$connect = mysql_connect("localhost", "root", "newman$") or
die ("Hey loser, check your server connection.");
Need Help

Reply With Quote