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.
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
Recent Comments