Jump to content

border9

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

border9's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. <?php session_start(); include("includes/db.php"); include("includes/common.php"); $dbconn=mysql_connect($hostname,$dbusername,$password)or die(mysql_error()); $connection = mysql_select_db($databasename,$dbconn); if(!$connection) { echo "connection failed on the db selection"; } if($_POST['Submit2_x']) { $sql_get_quote_num = "SELECT max(quote_number) as NUM FROM quotes"; $quote_num_result =@mysql_query($sql_get_quote_num); while($row = @mysql_fetch_array($quote_num_result)) { $quote_number = $row['NUM']; } // Add 1 to the existing count $quotenum= $quote_number + 1; $timeadjust = 60 * 60 * 3; $date_time = date("Y-m-d H:i:s",time() + $timeadjust); $site_tag = "www..com"; $insert_new_quote .="INSERT INTO quotes(quote_number,site_tag,date_time_received,number_of_items,items_type,items_length,"; $insert_new_quote .="items_width,items_height,items_commodity,items_class,items_description,first_name,"; $insert_new_quote .="last_name,telephone,email,city_orig,state_orig,zip_orig,country_orig,type_orig,city_dest,"; $insert_new_quote .="state_dest,zip_dest,country_dest,type_dest,total_weight,status,how_found,quote_type) "; $insert_new_quote .= "VALUES('$quotenum','$site_tag','$date_time','".$_POST['itemQuantity']."','".$_POST['itemPackage']."',"; $insert_new_quote .= "'".$_POST['itemLength']."','".$_POST['itemWidth']."','".$_POST['itemHeight']."',"; $insert_new_quote .= "'".$_POST['itemcommodity']."','".$_POST['itemclass']."','".$_POST['description']."',"; $insert_new_quote .= "'".$_POST['fname']."','".$_POST['lname']."','".$_POST['phone']."','".$_POST['Email']."',"; $insert_new_quote .= "'".$_POST['CityOrigin']."','".$_POST['StateOrigin']."','".$_POST['zipOrigin']."',"; $insert_new_quote .= "'".$_POST['CountryOrigin']."','".$_POST['radiogroup1']."','".$_POST['CityDestination']."',"; $insert_new_quote .= "'".$_POST['StateDestination']."','".$_POST['zipDestination']."','".$_POST['CountryDestination']."',"; $insert_new_quote .= "'".$_POST['radiogroup2']."','".$_POST['itemWeight']."','inbox','".$_POST['how_found']."','regular')"; $quote_insert = @mysql_query($insert_new_quote); $to = $_POST['Email']; $fromemail = "customerservice@email.com"; $subject = "Response From Website # " .$quotenum; // Additional headers $headers .= "To: <$to>\r\n"; $headers .= "From: <$fromemail>\r\n"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $message = ' <html> <head> </head> <body> <table width=\"68%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"> <TR> <td><div align=\"center\"><font face="Tahoma">Thank you for visiting </font></font></div></td> </TR> <TR> <td> </td> </TR> <TR> <td><p> Your quote has been received and one of our highly trained freight agents is preparing your freight rate now. <br><br> Remember all quotes are given at the most cost effective prices and for the fastest and most accurate shipping price we ask that you call and speak with one of our helpful agents. When you call, your agent can and will answer any questions you may have, as well as help you with all freighting options available in your respective areas.<br> <br> is a Continental North American Freight Logistic Company and uses more than 50 major freight carriers. Using our service you will be offered discount freight shipping prices, as well as fast and friendly freight shipping services.</p> <p align="center"><strong>Your discounted freight quote will be emailed to you shortly.</strong></p> <font face=\"Arial, Helvetica, sans-serif\"><br> </font></td> </TR> <TR> <td><div align="center"><img src="" alt="dfr" width="194" height="85"></div></td> </TR> <TR> <td><div align=\"right\"></div></td> </TR> <TR> <td> </td> </TR> <TR> <td><div align=\"center\"><font face=\"Arial, Helvetica, sans-serif\">You will be emailed by one of our agents as soon as your quote is ready.</font></div></td> </TR> <TR> <td> </td> </TR> <TR> <td><p><br> Continental North America Freight Logistics <br> </td> </TR> </table> </body></html> '; //EOF; $success2 = mail($to, $subject, $message, $headers); if ($success2) { $msg= "Thank you."; $url = "thank_you.php"; confirm($msg,$url); } else { $msg= "Sorry there was a problem sending your quote information."; $url = "quote.php"; confirm($msg,$url); } } ?> Ok whats happening, when i send out an email with the system it returns Nobody@serverinfo.com the actual Servers address. It wont return the email i tell it to, also when click submit it gives an error saying Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/serveraddress/public_html/newtestsite/quote.php:1) in /home/serveraddress/public_html/newtestsite/quote.php on line 4 Can anyone give me an idea why it isnt working right and what im doing wrong? Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.