HtmlPhp

Send Mail After Successful Registration In PHP

Send Mail After Successful Registration In PHP

Views

Hello to all, welcome to therichpost.com. 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.

php-registration-fom

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

<?php
if(isset($_POST[‘button’])){ //check if form was submitted
$to = $_POST[’email’];
$subject = ‘Successful Registration’;
$message = ‘Thank you’;
$headers = ‘From: webmaster@example.com’ . “\r\n” .
‘Reply-To: webmaster@example.com’ . “\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>
</form>

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. Therichpost.com

Ajay Malhotra
the authorAjay Malhotra
Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am full stack developer. I love coding. I know Wordpress, Core php, Angularjs, Angular 2, Angular 6, Angular 7, 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.

Positive SSL