使用ajax提交表单后获取表单值(mysql_insert_id)

I'm trying to get a value (mysql_insert_id) after my form was submitted by ajax and form validation (jquery.validationEngine) but without success..

$(document).ready(function()
{
        $("#form1").validationEngine('attach',
        {
            autoHidePrompt:true,showOneMessage:true,
            onValidationComplete: function(form, status)
                {
                    if(status === true)
                        {

                           formget(document.getElementById('form1'),'page.php');

           TINY.box.show({html:'The entry (i want the id here..) has been updated successfully!',animate:false,close:false,mask:false,boxid:'success',autohide:2,top:5});
}
          else
{
          TINY.box.show({html:'Please check the form and try  again',animate:false,close:false,mask:false,boxid:'error',autohide:2,top:5});
}
}  
});

My page.php file

$query="INSERT INTO users (userid,title,)VALUES ('".$_SESSION['id']."', '".$_REQUEST['title']."')"; $result=mysql_query($query);
$id = mysql_insert_id();
$query="INSERT INTO users (userid,title,)VALUES ('".$_SESSION['id']."', '".$_REQUEST['title']."')"; $result=mysql_query($query);
$id = mysql_insert_id();
echo mysql_error();

look at the error message;