k
am using php and mysql in dreamweaver.the thing is my code seems k and when running my webpage it is saying my staff are successfully inserted in mysql db.mysql database table has 4 columns ,productdescription,product quantity ,servicespecifications and requesyt id wc is auto increment.the auto increment is based on all the other columns being inserted .the problem is when when the staff is being dimmed as insertd in the database the request id auto increments its self,and nomatter wat qnty u enter it is displayed as 0.
here is my code:
<?php include('mysqlcon.php');
$ProdSpec= $_POST['ProdSpec'];
$ProdQnty= $_POST['ProdQnty'];
$ServDes = $_POST['ServDes'];
//select database
mysql_select_db($database_workplan_db, $workplan_db);
// create query
$query = "INSERT INTO request(ProdSpec,ProdQnty,ServDes)VALUES('$ProdSpe c','$ProdQnty', '$ServDes')";
$result = mysql_query($query,$workplan_db) or die ("Error in query: $query. ".mysql_error());
if($result) {
echo "request values successfully inserted, thank you.";
exit();
} else {
echo"cannot inserted request values";
}
?>