i have added action value Registration file
<body>
<div id="registration">
<h2><b><i>Electronic Montessori Learning</i><b></h2>
<form id="RegisterUserForm" action="connect.php" method="post">
<fieldset>
<p>
<label for="name">Name</label>
<input id="name" name="name" type="text" class="text" value="" />
</p>
<p>
<label for="password">Password</label>
<input id="password" name="password" class="text" type="password" />
</p>
<p>
<button id="registerNew" name="registerNew" type="submit">Register</button>
</p>
</fieldset>
</form>
</div>
<body>
I have not posted all code of registration.html as it is working fine
connect.php
<?php
$db=mysql_connect("localhost", "root", "") or die(mysql_error());
echo "Connected to MySQL<br />";
mysql_select_db("users") or die(mysql_error());
echo "Connected to Database";
$name ='';
$password ='';
if(isset($_POST['registerNew'])){
// Storing form values into PHP variables
$name = $_POST['name']; // Since method=”post” in the form
$password = $_POST['password'];
}
mysql_query("INSERT INTO user_eml(Name, Password) VALUES('$name', '$password' ) ")
or die(mysql_error());
echo "Data Inserted!";
echo 'Thank you for submitting your details!';
?>
but still its not working and when i press register button it shows php code of connect.php