Author Topic: i need help in my php code  (Read 321 times)

Talha Rafiq

  • New Member
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
<?php
if(isset($_POST['submit'])){
    $to = "info@getsolutions.site";
    $Fname = $_POST['FName'];
    $Lname = $_POST['LName'];
    $Bname = $_POST['BName'];
    $Address = $_POST['Address'];
    $Phone = $_POST['Phone'];
    $Email = $_POST['email'];
    $current_sp_elec = $_POST['current_sp_elec'];
    $consumption_elec = $_POST['Consumption_elec'];
    $meter_type = $_POST['meter_type'];
    $PC = $_POST['PC'];
    $MTC = $_POST['MTC'];
    $LLF = $_POST['LLF'];
    $area = $_POST['Area'];
    $mpan1 = $_POST['MPAN1'];
    $mpan2 = $_POST['MPAN2'];
    $CD = $_POST['CD'];
    $end_date_elec = $_POST['end_date_elec'];
    $st_elec = $_POST['st_elec'];
    $day = $_POST['day'];
    $night = $_POST['night'];
    $eve = $_POST['eve'];
    $current_sp_gas = $_POST['current_sp_gas'];
    $consumption_gas = $_POST['Consumption_gas'];
    $end_date_gas = $_POST['end_date_gas'];
    $mprn = $_POST['mprn'];
    $st_gas = $_POST['st_gas'];
    $unit_gas = $_POST['unit_gas'];
    $current_sp_tele = $_POST['current_sp_tele'];
    $lines = $_POST['lines'];
    $line_rent = $_POST['line_rent'];
    $broadband = $_POST['broadband'];
    $calls = $_POST['calls'];
    $bill = $_POST['bill'];
    $from = $Email;
    $name = $Fname + $Lname;
    $Number = $Phone;
    $subject = "Form submission";
    $subject2 = "Copy of your form submission";
    $message =  "Name :"." ".$name." "."Number :"." ".$Phone."\n"."E-Mail :"." ".$from." "."Business Name :"." ".$Bname."\n"."Address :"." ".$Address."\n"."--------Electricity Details----------"."\n"."Current Supplier :"." ".$current_sp_elec." "."Annual Consumption :"." ".$consumption_elec."\n"."Meter Type :"." ".$meter_type.""."Supply No :"." ".$PC." ".$MTC." ".$LLF."(".$area." ".$mpan1."".$mpan2."".$CD.")"."\n"."Contract End Date :"." ".$end_date_elec." "."Current Prices :"." ".$st_elec." ".$day." ".$night." ".$eve"\n"."--------Gas Details---------"."\n"."Current Supplier :"." ".$current_sp_gas.""."Annual Consumption :"." ".$consumption_gas."\n"."Contract End Date :"." ".$end_date_gas.""."MPAN :"." ".$mprn."\n"."Current Prices :"." ".$st_gas."ST"" ".$unit_gas."P""\n"."--------Telecom Details----------"."\n"."Current Supplier :"." ".$current_sp_tele." "."No of Lines :"." ".$lines."\n"."Current Package :"." ".$line_rent."Line Rent"." ".$broadband."BroadBand"." "$calls."Calls"." ""Total Bill :".$bill;
    $message2 = "Thank you" . " " . $name . "\n\n" . " We have received your message and contact you as early as possible.";
    $headers = "From:" . $from; //email come to us
    $headers2 = "From:" . $to; //reply of their email
    mail($to,$subject,$message,$headers);
    mail($from,$subject2,$message2,$headers2); //reply of their email
    header ("Location:thank you.php");
    }
?>

PHP Help Forum

i need help in my php code
« on: March 10, 2017, 06:47:36 am »



PHP Help Forum

Re: i need help in my php code
« Reply #1 on: March 10, 2017, 08:15:42 am »