Welcome Guest, Not a member yet? Register   Sign In
can anyone help me ? I m not able to connect database.
#1

[eluser]bhagatwala[/eluser]
--> I am using wampserver
--> I have saved file in controllers folder.
--> I am able to connect MySQL but not getting connected with Database.
--> Message that i am grtting is "databse not found"
code that i have written is
________________________________________________________________________________________
<html>
<head>
</head>
<body>
<?php
$username = "";
$password = "";
$hostname = "localhost";

$con_str = mysql_connect($hostname, $username, $password)
or die("MySQL not connected");
echo "MySQL Connected<br>";
$con_db = mysql_select_db("demo",$con_str) or die (" Database not found");
?&gt;
&lt;/body&gt;
&lt;/html&gt;
__________________________________________________________________________________________

I have set the config.php file database.php file also


Messages In This Thread
can anyone help me ? I m not able to connect database. - by El Forum - 02-02-2009, 10:06 AM
can anyone help me ? I m not able to connect database. - by El Forum - 02-02-2009, 10:26 AM
can anyone help me ? I m not able to connect database. - by El Forum - 02-02-2009, 10:28 AM
can anyone help me ? I m not able to connect database. - by El Forum - 02-02-2009, 06:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB