Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
Sending email from html form

I wrote the following code for sending email to my E-mail address from my site.

But it doesn't work.

I used the following HTML Form in the contact page in my site.

<?php

if(isset($_POST['submit'])) {
        $to ="amishaharali@gmail.com";
        $subject = "E-mail from Ushar Alo Contact Person";
        $txt = $_POST['comment']." -by :".$_POST['mail'];


$headers = "From: msalipbl@gmail.com";

        if(mail($to,$subject,$txt,$headers)){
                echo "Successfully sent!";
                }else{
                echo " Sorry! a problem to send the E-mail!";
                }

}else{


?>
        <hr/>

        <h3>Send e-mail to the Administrator :</h3>

        <form action="http://usharalo.eu.pn/contact.php" method="post">
        Name:<br>
        <input type="text" name="name"><br>
        E-mail:<br>
        <input type="text" name="mail"><br>
        Comment:<br>
        <input type="text" name="comment" size="50"><br><br>
        <input type="submit" name ="submit" value="Send">
        <input type="reset" name="reset" value="Reset">
        </form>

<?php } ?>
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!