Quantcast
Channel: WampServer - WampServer English
Viewing all articles
Browse latest Browse all 3177

WAMP server problem to connect php script (5 replies)

$
0
0
Problem with WAMP Server, In my Local system i success fully install the WAMP Server 3.0.4.
Then my problem was to connect the PHP script to WAMP Server database, I am trying connect the data base gives an error.


>i create a folder under "www" my folder name was "webapps"
>then under this "webapps" folder i had create a text file with name init.php,in this i had write code to connect data base and to display a message like... Data base connection success....
>then i connect the data base it not display messages, just it simply display my code as it is.
>my php code was

><?php
$db_name="webappdb";
$sql_name="root";
$sql_pass="root";
$server_name="localhost";
$con=mysqli_connect($server_name,$sql_name,$sql_pass,$db_name);
if(!$con){
echo"Database Connection Error...".mysqli_connect_error();
}
else{
echo"<h3>Database Connection Success....</h3>"
}
?>

Viewing all articles
Browse latest Browse all 3177

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>