I am giving the code where i belive the problem is accouring .... what happend it does not insert in to the data base i have tried all the way to put in to the data base but not working .. the last line of the code echo the hole things if does not able to inset it show the perfect data .... <?php //when postback if ($_POST) { require_once ('../../mysql_connect.php'); // Connect to the database. //calculate the next product ID $query_num = mysql_query('select MAX(product_id) from TestP'); $row = mysql_fetch_row($query_num); if ($row !== false) { $product_id = $row[0] +1; //fetching data $product_category = $category; $product_title = $title; $product_name = $_POST['product_name']; $product_code = $_POST['product_code']; $product_quantity = $_POST['product_quantity']; $product_weight = (float) $_POST['postage_weight']; $product_weight = settype($product_weight, float); $product_price = (float) $_POST['product_price']; $product_price = settype($product_price, float); if(isset($_POST['product_dangerous'])) { $product_dangerous = '1'; } else { $product_dangerous = '0'; } $product_dangerous = settype($product_dangerous, int); //query to inset $query_add_product_range = "INSERT INTO TestP SET product_id = $product_id, product_category=$product_category, product_title = $product_title, product_name = $product_name, product_code =$product_code, product_quantity_description = $product_quantity product_weight=$product_weight, product_price = $product_price, product_dangerous= $product_dangerous "; $result_add_range = mysql_query($query_add_product_range); if($result_add_range) { echo'done'; } else { echo $product_id,' ---', $product_category,' ---', $product_title,' ---', $product_name,' ---', $product_code,' ---', $product_quantity,' ---' ,$product_weight, ' ---',$product_dangerous, ' ---'; } } } ?>