"") { $type_move='Full House Hold'; } if($part_house<>"") { $type_move=$type_move.",".'Part household'; } if($items<>"") { $type_move=$type_move.",".'Selected items'; } if($air_freight<>"") { $type_move=$type_move.",".'Airfreight'; } if($car_shipping<>"") { $type_move=$type_move.",".'Car Shipping'; } if($sea_freight<>"") { $type_move=$type_move.",".'Sea freight'; } $tit_les= array("Mr" => "0", "Mrs" => "1", "Ms" => "2", "Dr" => "3"); $title=$_REQUEST['title']; $tit_value=array_search($title,$tit_les); $name=$_REQUEST['txtname']; $phone=$_REQUEST['txtphone']; $mobile=$_REQUEST['txtmobile']; $email=$_REQUEST['txtemail']; $hear_about=$_REQUEST['hear_about']; $address_from=$_REQUEST['txtaddress_from']; $town_from=$_REQUEST['txttown_from']; $zip_from=$_REQUEST['txtzip_from']; $country=$_REQUEST['country']; $destination_country=$_REQUEST['destination_country']; $destination_town=$_REQUEST['destination_town']; $destination_address=$_REQUEST['destination_address']; $d=$_REQUEST['moving_date1']; $d1=explode("-",$d); $moving_date=$d1[2]."-".$d1[0]."-".$d1[1]; $make=$_REQUEST['txtmake']; $year=$_REQUEST['txtyear']; $shipment_protection=$_REQUEST['shipment_protection']; $protection=$_REQUEST['txtprotection']; $storage=$_REQUEST['txtstorage']; $period=$_REQUEST['txtperiod']; $description=$_REQUEST['txtdescription']; $cdate=date('Y/m/d'); $typemove=$_REQUEST['type_move']; $typeweight=$_REQUEST['type_weight']; $typeitem=$_REQUEST['type_items']; $storage_det=$_REQUEST['storage_det']; $qry="insert into tbl_online_quotation(title,name,phone,mobile,email,hear_about,address_from,town_from,zip_from,country_from,country_destination,town_destination,address_destination,moving_date,type_move,type_weight,type_item,make,year,protection_cover,protection_value,storage,storage_period,storage_det,info,cdate,currency) values($title,'".$name."','".$phone."','".$mobile."','".$email."','".$hear_about."','".$address_from."','".$town_from."','".$zip_from."','".$country."','".$destination_country."','".$destination_town."','".$destination_address."','".$moving_date."','".$typemove."','".$typeweight."','".$typeitem."','".$make."','".$year."',$shipment_protection,'".$protection."',$storage,'".$period."','".$storage_det."','".$description."','".$cdate."','".$currency."')"; $inserted=mysql_query($qry); //header("Location:online_quote_result.php"); if($inserted) { /*Send mail to users*/ if($shipment_protection == 1) { $shipment_protection = "Yes"; } else { $shipment_protection = "No"; } if($storage == 1) { $storage = "Yes"; } else { $storage = "No"; } $myFile = "./letter_.html"; $body_content = file_get_contents($myFile); $name_cc="Administrator"; $mobile_no=($mobile <> "")? "  Mob: ".$mobile."" : ""; $content_new='
New Quote has been registered into Rightway Cargo

'; $content_new .='
Contact Details

'; $content_new .='
Name'.$tit_value.'.'.$name.'
Phone'.$phone.$mobile_no.'
Email Address'.$email.'
From Address
Address Line'.$address_from.'
Town/City'.$town_from.'
Post/Zip Code'.$zip_from.'
Country'.$country.'
To Address
Country'.$destination_country.'
Town/City'.$destination_town.'
Address'.$destination_address.'
Moving Date'.$moving_date.'
Type of move
Type'.$typemove.'
Items'.$typeitem.'
Currency'.$currency.'
Car details
Model'.$make.'
Year'.$year.'
Protection Cover'.$shipment_protection.'
Protection Value'.$protection.'
Storage'.$storage.'
Storage Period'.$period.'
Message'.$description.'
'; $content=$content_new.'

Thanks
'.$name_cc; /* From Details */ $sel_from="SELECT * FROM tbl_admin"; $qry_from=mysql_query($sel_from); $from_details=mysql_fetch_array($qry_from); /* To Details */ $sel_to="SELECT * FROM tbl_register WHERE status='1'"; $qry_to=mysql_query($sel_to); $to_add= array(); $counter=0; while($to_details=mysql_fetch_array($qry_to)) { if($counter==0) { $to_value=$to_details['email']; }else { $to_add[]=$to_details['email']; } $counter++; } $comma_to=join(",",$to_add); $to=$adminemail; $toname='Sir/Madom'; $map = array($toname ,$content); $values = array("#name#","#message#"); $new_content = str_replace($values,$map,$body_content); $mail_member=new PHPMailer(); //$to=$adminemail; $mail_member->From= $from_details['str_admin_email']; $mail_member->FromName=$name; //$mail_member->AddAddress("aneesh.j@caxita.com"); $mail_member->AddAddress("$to_value"); $mail_member->AddCC("$comma_to"); $mail_member->WordWrap=50; // set word wrap $mail_member->IsHTML(true); // send as HTML $mail_member->Subject="New Quotation Notification"; $mail_member->Body=$new_content; /* if(!$mail_member->Send()){ $msg="Mail Sending Failed"; } else{ $msg="Thank You, Your enquiry has been send successfully"; }*/ /*Send mail ends*/ } $msgnew="Your details has been submitted successfully"; } ?>

Online Quotation

"") {?>
* indicates mandatory fields
Title :
Name* :
Phone* :
Mobile :
Email* :
Where did you hear about us :
Address You are moving From    
Address Line* :
Town/City* :
Post/Zip Code :
Country* :
Address You are moving To    
Destination Country* :
Destination Town/City* :
Address you are moving to* :
Estimated Moving Date* :
Type of Move*
Select Type of move: :
Select Weight: :
Select Items: :
Select Your Currency: :
If you indicated car shipping please provide the following details.
Make/Model :
Year :
Do you require Shipment Protection Cover :
Estimated Protection Value :
Do you require storage :
Approx Storage Period :
Additional Information
Please provide us with any addtional information in the field below.
Cancel