Categories

Thursday, March 28, 2024
#919814419350 therichposts@gmail.com
HtmlPhp

Send Mail After Successful Registration In PHP

Send Mail After Successful Registration In PHP

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

therichpost
the authortherichpost
Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know WordPress, Core php, Angularjs, Angular 14, Angular 15, Angular 16, Angular 17, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.

Leave a Reply

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