Form data not storing in database
<p>Ok  my registration form data is not getting stored in database. Whereas if i do <code>$name="Bill";</code> then its storing but <code>$name='name';</code> is not working. Secondly when <code>i click</code> on <code>register button</code> its shows php code of file <code>connect.php.</code></p>

<p><strong>Registration code</strong></p>

<pre><code>&lt;body&gt;

&lt;div id="registration"&gt;
 &lt;h2&gt;&lt;b&gt;&lt;i&gt;Electronic Montessori Learning&lt;/i&gt;&lt;b&gt;&lt;/h2&gt;

 &lt;form id="RegisterUserForm" action="connect.php" method="post"&gt;
    &lt;fieldset&gt;
         &lt;p&gt;
            &lt;label for="name"&gt;Name&lt;/label&gt;
            &lt;input id="name" name="name" type="text" class="text" value="" /&gt;
         &lt;/p&gt;
        &lt;p&gt;
            &lt;label for="password"&gt;Password&lt;/label&gt;
            &lt;input id="password" name="password" class="text" type="password" /&gt;
         &lt;/p&gt;
       &lt;p&gt;
            &lt;button id="registerNew" type="submit"&gt;Register&lt;/button&gt;
         &lt;/p&gt;
    &lt;/fieldset&gt;

 &lt;/form&gt;
&lt;/div&gt;
&lt;body&gt;
</code></pre>

<p>and now <strong>connect.php</strong> code</p>

<pre><code>&lt;?php


$db=mysql_connect("localhost", "root", "") or die(mysql_error());
echo "Connected to MySQL&lt;br /&gt;";
mysql_select_db("users") or die(mysql_error());
echo "Connected to Database";


if(isset($_POST['Submit'])){
// 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!';
}




?&gt; 
</code></pre>
