Hello Ive recently installed Apache 2, PHP 5.02 and MYSQL 4.1 on Windows XP.
I am now tyring to connect to a database called bloomdb i have created in comman prompt mySQL.
I used an included script for security reasons. Here are the two pages (db_config.php and temp_con.php)
DB_CONFIG
<?php
$db_host = "localhost";
$db_user = "root";
$db_password = "password i used whe installing and connecting to MYSQL in command prompt";
$db_name = "bloomdb";
?>
TEMP_CON.PHP
<?php
require($_SERVER["DOCUMENT_ROOT"]."/config/db_config.php");
$connection = mysql_connect($db_name, $db_user, $db_password) or die("Error - Cannot connect to MYSQL Database");
echo "Connected Successfully";
?>
The error i get is: Call to undefined function mysql_connect() on line 4 of temp_con.
Now i have searched the net for this problem and found it is that mysql is not enabled?. Not with PHP 5 by default, I think i have done what you said in this guide correctly but not too sure.
When you say uncomment what does that mean?, can any of you nice people 🙂 explain how to enable it in very SIMPLE SIMPLE terms please.
Huge thanks in advance.
Chris