Hi Guys.
I am trying to write my first php script to connect to a sql db
When I go here http://localhost/xampp/simon/temp_con.php
I recieve this message
Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\xampp\simon\temp_con.php on line 3
here is the contence of the temp_con.php
<?php
require ($_SERVER ["DOCUMENT_ROOT"].//config/db_config.php");
$connection = mysql_connect ($db_host, $db_user, $db_password) or die ("error connecting");
echo "connection made";
?>
I am trying to get it to go to this folder \ file
C:\xampp\htdocs\xampp\simon\config\db_config.php where it contains this script
<?php
$db_host = "localhost";
$db_user = "root";
$db_password = "";
$db_name = "askhenry";
?>
I can connect to the db using localhost ( user, "root" ) with no password when using SQLyog or a dos box
what am I doing wrong guys ?
I am loosing allot of hair here as I am pulling it out !!
Cheers again guys
Pyro