input not submitting data to mysql <p>I'm making a very simple groups(like vb forum groups). I've coded all of it, after getting some errors and fixing it now it's showing the page without errors.</p> <p>The problem now is the data ISN'T being inserted to mysql. When putting the input into forms and then pressing create it goes to "?update=update" and echo's the success message, but doesn't submit to mysql.</p> <p>Code:</p> <pre><code>&lt;? if(!$update) { ?&gt; &lt;form action="make_group.php?update=update" method="post"&gt; Group name: &lt;br /&gt; &lt;input name="title" type="text" size="30" /&gt; &lt;br /&gt; Group picture: &lt;br /&gt; &lt;input name="picture" type="text" size="30" /&gt; &lt;br /&gt; Group desc: &lt;br /&gt; &lt;textarea name="desc" cols=30 rows=10 wrap=physical&gt;&lt;/textarea&gt; &lt;br /&gt; &lt;input type="submit" value="Create" /&gt; &lt;? } elseif($update==update) { $username = $_SESSION[usr_name]; $action = "made a group"; $title = clean($_POST[title]); $desc = clean($_POST[desc]); $pictures = clean($_POST[pictures]); $updateemail = mysql_query("insert into usr_groups(username, title, desc, picture) values('$username', '$title', '$desc', '$picture')"); $result = @mysql_query($qry2); echo("Your group has been created"); } ?&gt; </code></pre> <p>Above page code</p> <pre><code>&lt;? session_start(); include("config.php"); $ip = $_SERVER['REMOTE_ADDR']; $sqlcontent = mysql_query("select * from usr_config"); $content = mysql_fetch_array($sqlcontent); if(!isset($_SESSION[usr_name]) || empty($_SESSION[usr_name]) || !isset($_SESSION[usr_level]) || empty($_SESSION[usr_level])) { session_destroy(); session_unset(); die(' &lt;tr&gt; &lt;td&gt;&lt;meta http-equiv="REFRESH" content="0;url=/index.php"&gt;&lt;/HEAD&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/body&gt;'); } include("func.php"); $update = clean($_GET[update]); $getprof = mysql_query("select * from usr_users where username = '$_SESSION[usr_name]'"); $prof = mysql_fetch_array($getprof); ?&gt; </code></pre>