XAMPP - Fatal error: Call to undefined function mysql_connect()
<p>I downloaded downloading XAMPP for my learning lesson. After I finished the
install, I can use it normally. But when I try to connect to MySQL I keep return this error.</p>

<pre><code>&lt;?php

define("DB_HOST","localhost");
define("DB_USER","root");
define("DB_PWD","");
define("DB_DBNAME","text");
define("DB_CHARSET","utf8");

?&gt;
function connect(){
    $link=mysql_connect("DB_HOST","DB_USER","DB_PWD") or die("连接失败Error:".mysql_error().":".mysql_error());
    mysql_select_db(DB_DBNAME);
    return $link;
}
</code></pre>