Skip to content

Commit

Permalink
Added contact.php
Browse files Browse the repository at this point in the history
  • Loading branch information
guptadev21 authored Nov 20, 2021
1 parent 9c29480 commit 3f41f4d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions forms/contact.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
//before running this edit your sendmail/sendmail.ini in xammp folder.

$name = $_POST["name"];
$email = $_POST["email"];
$subject = $_POST["subject"];
$con = $_POST["message"];
$content = "Name: " . $name . "\nEmail: " . $email . "\nMessage: " . $con;

/* add your email to receive messages from customers here*/

if(mail('TOMAIL', $subject, $content, "FROMMAIL")) {
$sent_message = "Your contact information is received successfully.";
$type = "success";

}
require_once "contact.php";
echo "OK";
?>

0 comments on commit 3f41f4d

Please sign in to comment.