Tuesday, July 16, 2024

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.

the authortherichpost
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 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.