html - Sending email through PHP? -


i havent used php, , wanted make form on html file send email without using mailto:

i have looked online tutorials on how this, , best myself this.

<form method="post" action="contact.php">                 <input type="text" name="firstname" placeholder="first name" size="24px"/> <input type="text" name="lastname" placeholder="last name" size="24px"/><br>                 <input type="tel" name="phone" placeholder="address" size="53px"/><br>                 <input type="text" name="address" placeholder="phone number" size="53px"/><br>                 <input type="email" name="email" placeholder="email address" size="53px"/><br>                 <input type="email" name="confirmemail" placeholder="confirm email" size="53px"/><br>                 <input type="submit" name="submitbutton" /> </form> 

and php file best try this:

<?php  if($_post["submit"]) { $recipient="basketgiftsreceiver@gmail.com"; $subject="form email message"; $sender=$_post["email sender"]; $senderemail=$_post["basketgiftssender@gmail.com"]; $message=$_post["this message"];  $mailbody="name: $sender\nemail: $senderemail\n\n$message";  mail($recipient, $subject, $mailbody, "from: $sender <$senderemail>");  $thankyou="<p>thank you! message has been sent.</p>"; }  ?> 

when click submit button, this:

enter image description here

if of guys me this, appreciated.

thanks

by looks of issue not running web server on localhost.

https://www.apachefriends.org/index.html

php server side scripting , not run in web browser.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -