Why is this code giving “undifined variable” error at line no 40,41,42,43 and at line no 46 ? please help me to correct it .
[php]
<?php $con=mysql_connect('localhost','root',… mysql_select_db("ydms")or die("cannot select DB"); if ($con) { echo "connected"; } else { echo (error()); } // assigning values to the variables if(isset($_POST['customerID'])){$custo… if(isset($_POST['customerName'])){$cus… if(isset($_POST['shopName'])){$shopNam… if(isset($_POST['custAdd1'])){$cust_ad… if(isset($_POST['custAdd2'])){$cust_ad… if(isset($_POST['custAdd3'])){$cust_ad… if(isset($_POST['custCity'])){$cust_ad… if(isset($_POST['contactperson'])){$cu… if(isset($_POST['contactNo1'])){$cust_… if(isset($_POST['contactNo2'])){$cust_… if(isset($_POST['routeNumber'])){$rout… if(isset($_POST['customerState'])){$st… if(isset($_POST['customerRemarks'])){$… echo "done"; //inserting values in to the database $sql = "INSERT INTO `customer`(`cust_id`, `cust_name`, `cust_shop_name`, `cust_add_hnumber`, `cust_add_line1`, `cust_add_line2`, `cust_add_city`, `cust_contact_name`, `cust_contact1`, `cust_contact2`, `route_no`, `state`, `cust_remark`) // line number 40 start from here....................................… VALUES ('" . $customerName . "', '" . $shopName . "','" . $cust_add_hnumber . "', '" . $cust_add_line1 . "','" . $cust_add_line2 . "', '" . $cust_add_city . "', '" . $cust_contact_name . "', '" . $cust_contact1 . "', '" . $route_no . "', '" . $state . "','" . $cust_remark . "')"; // line no 46 is here....................................… $result = mysql_query($order) or die (mysql_error()); //verification if($result){ echo "Successful"; } else { echo "ERROR"; } ?>[/php]