prathikanoe
07-02-2009, 02:22 AM
hi..
i am facing a basic silly problem that i am not able to solve.when i attempt to insert values into my database i am not able to do it.the mysql_query is not working here. it is not executing when i give id even it is not null..
here is my code:
<?php
include("connection.php");
if(isset($_POST['Submit']))
{
$name=$_POST['menuname'];
$de=$_POST['des'];
$ord=$_POST['order1'];
echo $q="insert into menureg(menuname,des,order1)values('$name','$de','$ord')";
echo $r=mysql_query($q);
/*if($q)
{
header("location:process.php");
ob_flush();
}*/
}
?>
as per my coe i am not inserting id field, but it is in my database..
id - int(15) , autoincrement,primary key..
can anyone help why mysql_query is not working.. please help me. expecting reply
i am facing a basic silly problem that i am not able to solve.when i attempt to insert values into my database i am not able to do it.the mysql_query is not working here. it is not executing when i give id even it is not null..
here is my code:
<?php
include("connection.php");
if(isset($_POST['Submit']))
{
$name=$_POST['menuname'];
$de=$_POST['des'];
$ord=$_POST['order1'];
echo $q="insert into menureg(menuname,des,order1)values('$name','$de','$ord')";
echo $r=mysql_query($q);
/*if($q)
{
header("location:process.php");
ob_flush();
}*/
}
?>
as per my coe i am not inserting id field, but it is in my database..
id - int(15) , autoincrement,primary key..
can anyone help why mysql_query is not working.. please help me. expecting reply