调用未定义的函数mysql_connect?

Here is the error message:

Fatal error: Call to undefined function mysql_connect() in /var/www/config.php on line 10

Below is the code:

<?php

ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);

include('config.php');

// table name
$tbl_name=temp_members_db;

// Random confirmation code
$confirm_code=md5(uniqid(rand()));

// values sent from form
$name=$_POST['name'];
$email=$_POST['email'];
$country=$_POST['country'];

// Insert data into database
$sql="INSERT INTO $tbl_name(confirm_code, name, email, password, country)VALUES('$confirm_code', '$name', '$email', '$password', '$country')";
$result=mysql_query($sql);

// if suceesfully inserted data into database, send confirmation link to email
if($result){

// ---------------- SEND MAIL FORM ----------------

// send e-mail to ...
$to=$email;

// Your subject
$subject="Your confirmation link here";

// From
$header="from: your name <your email>";

// Your message
$message="Your Comfirmation link 
";
$message.="Click on this link to activate your account 
";
$message.="http://www.yourweb.com/confirmation.php?passkey=$confirm_code";

// send email
$sentmail = mail($to,$subject,$message,$header);

}

// if not found
else {
echo "Not found your email in our database";
}

// if your email succesfully sent
if($sentmail){
echo "Your Confirmation link Has Been Sent To Your Email Address.";
}
else {
echo "Cannot send Confirmation link to your e-mail address";
}

?>php

Your PHP installation was compiled without MySQL support. Either read the instructions for compiling PHP with MySQL, or contact your server administrators and find out why it's unavailable.

If you're using a pre-built bundle like WAMP or XAMPP, update your question with the appropriate tag to receive more specific help.

You need to install MySQL and the PHP MySQL module.

check this site

http://www.somacon.com/p109.php

basically if im assuming everything is good in the config file there's been some misconfiguration so mysql isn't working properly

look into your php.ini and search for that line:

extension=php_mysql_libmysql.dll

if you have a ; standing infront of the word extension in that very line like this:

;extension=php_mysql_libmysql.dll

remove the ; and restart apache/iis. Then it should work.

If the ; is not in foront of that line or that line doesn't exist then look into your php/ext/ folder if these two files exist:

php_mysql.dll
php_mysql_libmysql.dll

If they do exist then just put this line into yur php.ini and restart apache/iis:

extension=php_mysql_libmysql.dll

Otherwise you'll have to recompile php like my predecessors suggested