Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/277057-php-email-form-help/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1425620
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1425633
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1425647
Share on other sites

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 by Jessica
Link to comment
https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1425654
Share on other sites

  • 3 weeks later...

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! ::)

Link to comment
https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1429120
Share on other sites

  • 1 month later...

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!

Link to comment
https://forums.phpfreaks.com/topic/277057-php-email-form-help/#findComment-1435294
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.