trying to connect database with php : <p>I'm making a registration page and I have phpmyadmin set on xampp, my apache's port is <code>8080</code> and 
my table's name is <code>registration</code> and my database's name is <code>loginregister</code>,
whenever I submit it the values arent getting transmitted to the table and i don't see any errors, help?</p>

<p>this is my code:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Register&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form action="" method="post" name="form1"&gt;
    &lt;table&gt;
        &lt;tr&gt;
            &lt;td&gt;Enter your first name*&lt;/td&gt;
            &lt;td&gt;&lt;input type="text" name="fname" required="yes" pattern="^[a-z1-9]+"&gt;&lt;/td&gt;
            &lt;td&gt;&lt;p&gt;Username takes only small letters or numbers, no capital letters&lt;/p&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Enter your last name*&lt;/td&gt;
            &lt;td&gt;&lt;input type="text" name="lname" required="yes"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Enter your password*&lt;/td&gt;
            &lt;td&gt;&lt;input type="password" name="pw" required="yes"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Enter your email adress*&lt;/td&gt;
            &lt;td&gt;&lt;input type="email" name="email" required="yes"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;Enter your username*&lt;/td&gt;
            &lt;td&gt;&lt;input type="text" name="uname" required="yes"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;input type="submit" value="submit" name="submit1"&gt;&lt;/input&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/form&gt;
    &lt;?php
        if(isset($_POST['submit1']))
        {
        $link=mysqli_connect('localhost','root','' , "loginregister");
        $res= "INSERT INTO loginregister (fname , lname , pw , email , uname) VALUES('$_POST[$fname]','$_POST[$lname]','$_POST[$pw]','$_POST[$email]','$_POST[$uname]'))";
        }
    ?&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
