Okay, so I am helping a non-profit company with their website. As of right now I've got a simple .php file sending the email to the owner. No database.
Right now I am in the testing phase.
Well, I get the success page when I fill it out and hit submit. But no E-mail.
I uploaded it to a different server and it worked GREAT... but in all of my fields it is chopping off one character.
1). What can I change to get the non-profit server to allow me to use the simple .php script to send an Email? Never had an issue with this script before, and like I said, it WORKS on a different server.
2). What would cause a php script to chop the last character off when it sends? Ex: Instead of "Test" I got "Tes".
Here's the PHP script:
PHP Code:
<?php // Receiving variables @$pfw_ip= $_SERVER['REMOTE_ADDR']; @$Send_product_literature = addslashes($_POST['Send_product_literature?']); @$Send_company_literature = addslashes($_POST['Send_company_literature?']); @$Have_a_salesperson_contact_me = addslashes($_POST['Have_a_salesperson_contact_me?']); @$Name = addslashes($_POST['Name']); @$Title = addslashes($_POST['Title']); @$Company = addslashes($_POST['Company']); @$Address = addslashes($_POST['Address']); @$Phone = addslashes($_POST['Phone']); @$Email = addslashes($_POST['Email']);
// Validation //Sending Email to form owner $pfw_header = "From: $Email\n" . "Reply-To: $Email\n"; $pfw_subject = "Online Information Request Form"; $pfw_email_to = "myemail@gmail.com"; $pfw_message = "Visitor's IP: $pfw_ip\n" . "Send_product_literature: $Send_product_literature\n" . "Send_company_literature: $Send_company_literature\n" . "Have_a_salesperson_contact_me: $Have_a_salesperson_contact_me\n" . "Name: $Name\n" . "Title: $Title\n" . "Company: $Company\n" . "Address: $Address\n" . "Phone: $Phone\n" . "Email: $Email\n"; @mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: ../success.php");
?>
Oh, and yeah, I'm kind of a newbie here. I do some non-profit work for schools and what not to help them along with what I can do to save them money.
__________________
- Chris. Dabbling learner.
Last edited by redline5th; 11-08-2009 at 01:21 AM..
|