uaintgotthisid Posted August 12, 2008 Share Posted August 12, 2008 Hi all,I'm clearly a new guy here, so forgive any ignorance.I've followed the PHP mail example shown on w3schools here: http://www.w3schools.com/php/php_secure_mail.aspHowever, when I test the page I notice that there are extra characters after the form (the characters close the php echo and then close the } and then the php i.e. ""; } ?> "). It seems that the echo function won't shut up and is babbling out all the PHP at the end. If you want an example of what I'm talking about just copy and paste the example they show. I was trying the one without injections but it seems the others do similar things. I've seen this on quite a lot of websites, so it's possibly a common problem.Thanks in advance. Link to comment Share on other sites More sharing options...
Ingolme Posted August 12, 2008 Share Posted August 12, 2008 Are you running this on a PHP enabled server? Link to comment Share on other sites More sharing options...
uaintgotthisid Posted August 12, 2008 Author Share Posted August 12, 2008 Are you running this on a PHP enabled server?At first I was running it on my PC, but I soon realise this could be an issue and FTP'd it. Still no joy. It must be a simple problem I'm sure. I've seen it on other websites though... so perhaps not. Link to comment Share on other sites More sharing options...
boen_robot Posted August 12, 2008 Share Posted August 12, 2008 Follow this tutorial (even though it's for earlier versions of everything, the instructions remain the same), and once you finish the "test PHP" step, try the W3Schools example again. Link to comment Share on other sites More sharing options...
uaintgotthisid Posted August 12, 2008 Author Share Posted August 12, 2008 Follow this tutorial (even though it's for earlier versions of everything, the instructions remain the same), and once you finish the "test PHP" step, try the W3Schools example again.I have accounts with multiple hosting companies. They all display the same issue. I'm pretty sure it's not the PHP installation. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 12, 2008 Share Posted August 12, 2008 The PHP code is correct, it's not going to show the characters at the end if PHP is working on the server. To test that yourself, open your page in the browser and view the source code. If you see any PHP code in there, anything that is not HTML, then PHP isn't being executed. When you open the page in the browser you should only see HTML code, no PHP. PHP code doesn't get sent to the browser. Link to comment Share on other sites More sharing options...
Jesdisciple Posted August 13, 2008 Share Posted August 13, 2008 Just to make sure, does your file have the .php extension? Link to comment Share on other sites More sharing options...
jeffman Posted August 13, 2008 Share Posted August 13, 2008 I copy/pasted the code and duplicated your error just by naming the file with an .html extension. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.