session_start(); require_once("includes/connection.php"); db_connect(); $SQL="select * from tbl_category where category_id='1' order by sequence"; $res=mysql_query($SQL); $numrows=mysql_num_rows($res); if($numrows>0){ while($obj=mysql_fetch_object($res)) { $strCatID=$obj->category_id; $strDescription=$obj->description; $strImage=$obj->image; } } if($_REQUEST['seopname'] == "") { $SQLd="select * from tbl_subcategory order by category_id"; } else { $SQLd="select * from tbl_subcategory where seoenquiry = '".$_REQUEST['seopname']."' order by category_id"; } $resd=mysql_query($SQLd); echo mysql_error(); $numrowsd=mysql_num_rows($resd); if($numrowsd>0){ if( ($_REQUEST['Mode'] == "SUBMIT")) { $sql = "insert into " .tbl_enquiry. "(product_name,name,company_name,email_address,address,telephone,fax,country,comments,enquiry_date)values ('".trim($_REQUEST["txtmname"]) ."','".trim($_REQUEST["txtname"]) ."','".trim($_REQUEST["compname"]) ."','".trim($_REQUEST["txtemail"]) ."','".trim($_REQUEST["txtaddress"]) ."','".trim($_REQUEST["txtphone"]) ."','".trim($_REQUEST["txtfax"]) ."','".trim($_REQUEST["country"]) ."','".trim($_REQUEST["txtcomments"]) ."',now())"; mysql_query($sql); mysql_error(); $mailmsg =""; $mailmsg .= ""; $mailmsg .= "
Enquiry Form Submission | \n|
Product Name | ".stripslashes($_REQUEST['txtmname'])." | \n
Name | ".stripslashes($_REQUEST['txtname'])." | \n
Company Name | \n".stripslashes($_REQUEST['compname'])." | \n
Email Id | ".stripslashes($_REQUEST['txtemail'])." | \n
Address | ".stripslashes($_REQUEST['txtaddress'])." | \n
Telephone | ".stripslashes($_REQUEST['txtphone'])." | \n
Fax | ".stripslashes($_REQUEST['txtfax'])." | \n
Country | ".stripslashes($_REQUEST['country'])." | \n
Comments | ".stripslashes($_REQUEST['txtcomments'])." | \n