Sunday, July 12, 2020

Send Mail After Successful Registration In PHP

Send Mail After Successful Registration In PHP


Hello to all, welcome to In this post, I will tell you how to Send Mail After Successful Registration In PHP? This is basic functionality and In this form you just add form value and press the button and Successful Registration email will receive on your email id.


Here is the working code and you need to add into your php file:

if(isset($_POST[‘button’])){ //check if form was submitted
$to = $_POST[’email’];
$subject = ‘Successful Registration’;
$message = ‘Thank you’;
$headers = ‘From:’ . “\r\n” .
‘Reply-To:’ . “\r\n” .
‘X-Mailer: PHP/’ . phpversion();

mail($to, $subject, $message, $headers);
<h1>Registration Form In Php</h1>
<form action=”” method=”post”>
collegeName:<input type=”text” name=”collegename”><br>
Email: <input type=”text” name=”email”><br>
Password: <input type=”password” name=”password”><br>
<button type=”submit” name=”button”>Registration</button>

There are so many codes in PHP and I will let you know all. Please do comment if you any query related to this post. Thank you.

Ajay Malhotra
the authorAjay Malhotra
Hello to all. Welcome to Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know Wordpress, Core php, Angularjs, Angular 2, Angular 6, Angular 7, Angular 8, Angular 9, Angular 10 Nodejs, laravel, Codeigniter, Shopify, Squarespace, Jquery, Google Map Api, Vuejs, Reactjs, Bigcommerce etc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.