Unable to connect mysql via php
Posted: Wed Mar 25, 2009 11:45 am
Hello All!
I am new to mysql and php.I tried to connect mysql with php via the following code.But, all i get is an error message HTTP 500 internal server error.
<?php
$conn = mysql_connect("localhost","root","abha") or die(mysql_error());
mysql_select_db("project",$conn);
?>
I am using:-
Php 5.2.8
Apache 2.2.11
Mysql 5.0.67
Operating System - Vista Home edition
Please solve my problem.
Thanks in advance.
I am new to mysql and php.I tried to connect mysql with php via the following code.But, all i get is an error message HTTP 500 internal server error.
<?php
$conn = mysql_connect("localhost","root","abha") or die(mysql_error());
mysql_select_db("project",$conn);
?>
I am using:-
Php 5.2.8
Apache 2.2.11
Mysql 5.0.67
Operating System - Vista Home edition
Please solve my problem.
Thanks in advance.