oavs Posted June 5, 2008 Share Posted June 5, 2008 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>"); } ?> Quote Link to comment Share on other sites More sharing options...
phpzone Posted June 5, 2008 Share Posted June 5, 2008 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 Quote Link to comment Share on other sites More sharing options...
oavs Posted June 5, 2008 Author Share Posted June 5, 2008 Thanks but did adding erro reprting did nothing. Its the same blank page. I am going crazy Quote Link to comment Share on other sites More sharing options...
oavs Posted June 5, 2008 Author Share Posted June 5, 2008 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.