My code do not showing any error message, but data is not submitted to the data base
here is my code, Please help me..
“`php
<?php
include_once ‘database1.php’;
error_reporting(0);
if(isset($_POST[‘submit’]))
{
$result = executeQuery(“select max(f_id) as std from order”);
$r = mysql_fetch_array($result);
if(is_null($r[‘std’]))
{
$newstd = 1;
}
else
{
$newstd = $r[‘std’] +1;
}
if (empty($_REQUEST[‘name’]) || empty($_REQUEST[‘address’]) || empty($_REQUEST[‘mobile’]))
{
$_GLOBAL[‘message’] = ” Some field are empty .”;
}
else
{
$query=”INSERT INTO order (f_id, name, address, mobile)
VALUES($newstd,
‘” . htmlspecialchars($_REQUEST[‘name’], ENT_QUOTES) . “‘,
‘ ” . htmlspecialchars($_REQUEST[‘address’],ENT_QUOTES) .”‘,
‘ ” . htmlspecialchars($_REQUEST[‘mobile’], ENT_QUOTES) .”‘
)”;
mysql_query($con, $query);
// mysql_query($query, $con);
if(!@executeQuery($query))
{
$_GLOBAL[‘message’]= mysqli_error();
}
else
{
$_success=true;
$_GLOBAL[‘message’]= “Data is submitted.”;
}
}
}
?>
<html>
<body>
<p>
Please give your details
</p>
<form action=”form1.php” target=”_blank” method=”post”>
Enter your name : <br>
<input type=”text” name=”name”><br>
Enter your address : <br>
<input type=”text” name=”address”><br>
Enter your mobile no : <br>
<input type=”text” name=”mobile”>
<input type=”submit” name=”submit” value=”submit”>
<input type=”reset” name=”reset”>
</form>
</body>
</html>