MySQL Forums
Forum List  »  PHP

could not connect mysql with php
Posted by: Abha Gupta
Date: March 13, 2009 10:12AM

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
Please solve my problem.
Thanks in advance.

Options: ReplyQuote


Subject
Written By
Posted
could not connect mysql with php
March 13, 2009 10:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.