I just want to get a successful connection
I'm having a big problem, which I haven't been able to figure it out. I'm running PHP 5, Apache, and MySQL 5.0.... and the following code, which always give me a 'call to undefined function mysql_connect(),' doesn't work:
<?php
$link = mysql_connect("host", "user", "pass") or die ("sorry");
?>
I've read the documentation on php.net and mysql.com to find out what's wrong with it. I tried to use mysqli_connect, because apparently the function 'mysql_connect()' doesn't work with versions of mysql 4.1 and above. Well, 'mysqli_connect()' doesn't work either, I still get the same error. The documentation suggests that I use "--with-mysqli=mysql_config_path/mysql_config configuration option where mysql_config_path represents the location of the mysql_config program that comes with MySQL versions greater than 4.1." So now the question is, where do I find this configuration option to change it and is there evidence that it will work. I was really excited to get to learn this until this %%%*&^&* error message appeared. Any help would be greatly appreciated. Thanks.
|