Jump to content

My PHP form isn't sending- I get a blank page. here is the form >


oavs

Recommended Posts

Hi

 

I was wondering if someone have quick look at my code below to see why its not working. CSimpleHitCounter.php and hits.txt is not essential but it used to work before until server backed up from the old files and don't know how I had it going.

 

Thanking you in advance.

 

 

 

<?php 

include_once("CSimpleHitCounter.php");  

$counter = new CSimpleHitCounter("hits.txt"); 
$counter->update_hits_file();


// EMAIL SENT TO THE VISITOR //
$to = "fred@oooo.com.au";
$headers = 
 "From: OOOO - XYZ ts <support@oooo.com.au>"  . "\r\n" .
     "Subject: Your Login Details for your Art Work" .
     "Reply-To: support@oooo.com.au" . "\r\n" .
     "cc:$Email" . "\r\n" .
     "X-Mailer: PHP/" . phpversion();

$from_header = 
"Hello $Name, 

Thankyou for allowing us to create and ammend your artwork commissioned to OOOO .

Please use following login details to see your project. 
Click on to the URL link below to visit the website. Then select LOGIN - Client Project Login from the navigation menu and enter your user name and pasword listed below. 

URL: http://www.oooo.com.au
Username: admin 
Password: enter 

$Name, so far you have seen your artwork ".$counter->get_page_loads()." times

We have received following contact details from you. 

Name: $Name $Surname,
Company: $Company
Phone: $Phone 
Email: $Email 

You have also accepted OOOO Terms and Conditions of viewing your logo commissioned to OOOO
";

if($Name != "")
if($Surname != "")
if($Company != "")
if($Phone != "")
if($Email != "")
{
   //send mail - $subject & $contents come from surfer input
  // mail($to, $Company, $from_header, "Bcc: $Email" . $headers);
  mail($to, $subject, $from_header, $headers);



   // redirect back to url visitor came from
   header("Location: select.php");
}
  else
{
   print("<HTML><BODY>Error, no comments were submitted!");
   print("</BODY></HTML>");
}
?>

Link to comment
Share on other sites

If you add error_reporting( E_ALL ) to the top of your code do you see any errors?

 

Sometimes blank pages can be because of runtime errors and the server not being

set to show them.  In some cases you may need to upload a .htaccess that sets the PHP

flag display_errors

Link to comment
Share on other sites

Thanks but did and its reporting this. What is that mean?

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home2/oavscom/public_html/ecomail/send.php on line 17

 

Line  16 >    "cc:$Email"

Line 17 >    "X-Mailer: PHP/" . phpversion();

Line 18 >                            ......................... blank line

Line 19 >      $from_header =

Line 20 >      "Hello $Name,

Line 21 >                            ......................... blank line

 

etc 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.