在joomla中创建自己的表单时出现SQL错误

hey guys i want to creat my own form in joomla and use the post method . so i download extension to make my own code in articles in joomla like this

<form action="http://localhost/ocr/includes/Create_Subject.php" method="post">

username <input type="text" name="menu_name" value=""/><br/>

password <input type="text" name="id" value=""/><br/>

<input type="submit" name="save" value="Submit" />
</form>

and then i go to my website data base and create a table called show to add into it my values which i get it from my form and also make a php file called (Create_Subject.php) and i put it in includes file in my website and called it by action like u see in my code in my html and the code of that php here

<?php 
 $coonect=mysql_connect("localhost","root","");
     if(!$coonect){
  echo "Data_base error";
    die(mysql_error());
    }
     ?>
   <?php
       $username=$_POST['menu_name'];
       $id=$_POST['id'];

       $db_select=mysql_select_db("ocr");
       if(!$db_select){
    die(mysql_error());
     echo" error";

         }
             $query= "INSERT INTO show (
            name , id ) 
            VALUES( '{$username}' ,{$id} ) " ;

                 if(mysql_query($query)){
         header("www.google.com");
           exit;
          }else{
       echo"<p> error </p>";
      }

           ?>

`

and when iam run the site show to my an error what am doing wrong any heleeeep plez ....:))

Here you can find plenty of information about SQLQuering with Joomla!

http://docs.joomla.org/Accessing_the_database_using_JDatabase

You can ask anything you want if you have any trouble...