undefined mysql_connect
Posted: Mon Feb 09, 2004 8:34 pm
the following code worked fine with mysql on localhost..
however from a linux box connecting to a other computer i didnt anymore
Anybody got some ideas>???
however from a linux box connecting to a other computer i didnt anymore
Anybody got some ideas>???
Code: Select all
$host = '10.10.10.2';
$user = 'root';
$pass = '';
$connection = mysql_connect($host, $user)
or die("cannot make connection");
//select our database email
$db = mysql_select_db("email" , $connection)
or die("cannot find database");
//insert the values of our form into our database
$sql_query = "INSERT INTO email VALUES ("$company","$name","$email")";
$results = mysql_query($sql_query);Code: Select all
ERROR
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/mail/joinnewsletter.php on line 7