Connection to mySQL through PHP

Status
Not open for further replies.

prathamtawde

Broken In
Dear Digiterzz!!

I'm trying to create a connection between mySQL database through PHP but I'm not able to do so..
Check out the following code:

<?php
$dbhost = 'mysql2.freehostia.com';
$dbuser = 'db_User';
$dbpass = 'admin';

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql');

$dbname = 'db_Rakshak';
mysql_select_db($dbname);
?>


Please help!!
Thanks :)
 
OP
P

prathamtawde

Broken In
please post the error msg you are getting while connecting mysql to php

blank web page appears..

blank web page appears..

Not Found

The requested URL /test.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.33 Server at prathamtawde.freehostia.com Port 80
 
Last edited:

Garbage

God of Mistakes...
If a 404 error, then it's not your code problem. Check the path of file and put the address according to that.
 
Status
Not open for further replies.
Top Bottom