Supposedly the PHP file should connect to the database. But whenever I click the submit button, it print out the code itself :c
PHP CODE:
<?php
$host = "localhost";
$sname = "root";
$database = "products";
mysql_connect("$host","$sname") or die(mysql_error());
echo "connected successfully!";
mysql_select_db("$database") or die(mysql_error());
echo "Database selected successfully!";
?>
This is how my html code looks like: Deleted the code inside it because its too long
<form action="registration.php">
.....
.....
</form>