0

Hie.My php code is returning as the actual code on my browsers.its not giving output.it just show the code as it is.

<?php
$servername = "localhost";
$username = "root";
$password = "";


$db_name="agric";
// Create connection
$conn = new mysqli_connect("$servername", "$username", "$password",);
mysql_select_db($db_name)or die("Could not connect to database");

// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 
echo "Connected successfully";
?>

my database is agric and i created it using xampp.Can someone help me with a solution.

0 Answers0