Caf26 Posted April 17, 2013 Share Posted April 17, 2013 I am new to php and want to add a form to my site to send am email to the owner on completion of the form, I have got the code but when I try to run it in chrome (through notepad++) I click submit but it show the php code rather than sending an email, is this a problem with the code or because it's not on a server and just tan through notepads run in chrome function Quote Link to comment https://forums.phpfreaks.com/topic/277057-php-email-form-help/ Share on other sites More sharing options...
Jessica Posted April 17, 2013 Share Posted April 17, 2013 Moved to the correct forum. You need to be running a web server. Quote Link to comment https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1425365 Share on other sites More sharing options...
Minato Posted April 18, 2013 Share Posted April 18, 2013 Moved to the correct forum. You need to be running a web server. To expand on this a bit more. You need a server setup (There are products out there (free, of course)) that you can use to go as a localhost. My personal favorite is WAMPserver. It comes with the APACHE, PHP, and MySQL with phpMyAdmin. Once you get it all setup, then you can test your PHP E-mail script. Quote Link to comment https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1425620 Share on other sites More sharing options...
jazzman1 Posted April 18, 2013 Share Posted April 18, 2013 You need to be running a web server. Just to be clear: 1. He doesn't have a web server running php scripts, he needs to have only a server for example a linux one. 2. The web server doesn't care about emails only mail server cares of that. Quote Link to comment https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1425633 Share on other sites More sharing options...
Jessica Posted April 18, 2013 Share Posted April 18, 2013 Uhm, go reread this question. Quote Link to comment https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1425638 Share on other sites More sharing options...
jazzman1 Posted April 18, 2013 Share Posted April 18, 2013 Jessi, I understand what you want to say to him, but sometimes the users especially windows one, they messed up php, http, mysql, smtp, etc..... What wrong I said here: He doesn't have to have a web server to execute php scripts and to send emails it has requered an mail server. Quote Link to comment https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1425647 Share on other sites More sharing options...
Jessica Posted April 18, 2013 Share Posted April 18, 2013 (edited) He does if he wants to run the scripts in the browser. Yes, you can run PHP in the command line. DO you really think that's what he wants to do? The problem is that he doesn't even have a web server running. From THERE he can worry about the email server. Edit: By web server I am talking about the software, not the hardware. He needs Apache or similar. I use Apache on my windows machines. It has nothing to do with the Operating System or the hardware. Edited April 18, 2013 by Jessica Quote Link to comment https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1425654 Share on other sites More sharing options...
jazzman1 Posted April 19, 2013 Share Posted April 19, 2013 DO you really think that's what he wants to do? Who knows.....maybe one day Quote Link to comment https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1425857 Share on other sites More sharing options...
buzzycoder Posted May 8, 2013 Share Posted May 8, 2013 As of I think he wants to send mails from his PC & he got the code too,but when he run it in the browser he got php code rather than output.As you guys said,he need web server & mail setup too. Caf26 : You can try Xampp & setup mercury mail in it.So,you can easily send mails from your pc or local server.Hope it helps you & other newbies! Quote Link to comment https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1429120 Share on other sites More sharing options...
Caf26 Posted June 11, 2013 Author Share Posted June 11, 2013 Hi i am pretty new to html and php coding, i am creating a website and have a contact form on one of my pages i have gathered the code and got the form working when hosted with 000webhost (free hosting) i have now purchased hosting from go daddy and uploaded my site there, my contact form now shows code in each field although its the same file as i uploaded to the free hosting site. can anybody suggest why it is doing this with go daddy, i have the deluxe hosting package. thanks! Quote Link to comment https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1435294 Share on other sites More sharing options...
mac_gyver Posted June 11, 2013 Share Posted June 11, 2013 posting your code would be the quickest way of helping you find what it is doing that might be server specific. best guess is you got caught using php's short open tags <? Quote Link to comment https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1435320 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.