Skip to content
pakainfo

Pakainfo

Web Development & Good Online education

  • Home
  • Blog
  • Categories
  • Tools
  • Full Form
  • Guest Post
  • Advertise
  • About
  • Contact Us

Send Forgot password by mail or message in PHP

October 9, 2020 Pakainfo php, Ajax, JavaScript, jQuery, Mysql, Mysqli Leave a comment

Today, We want to share with you forgot password in php.In this post we will show you Change or reset password php code, hear for Change or reset password in php mysqli we will give you demo and example for implement.In this post, we will learn about password by mail or message in PHP with an example.

simple forgot password code in php

Contents

  • simple forgot password code in php
    • Step 1 connecting database
    • Step 2 Forgot Password in PHP
    • Summary
    • Related posts

There are the Following The simple About send reset password link email ph Full Information With Example and source code.

Free Live Chat for Any Issue

As I will cover this Post with live Working example to develop Change or reset password in php, so the Change or reset password code in php with mail is used for this example is following below.

Also Read This πŸ‘‰   Download Extract Zip Archives using PHP cURL

Step 1: connecting database

dbConfig.php

<?php
	$servername='localhost';
	$username='root';
	$password='';
	$dbname = "pakainfo";
	$conn=mysqli_connect($servername,$username,$password,"$dbname");
	if(!$conn){
	 die('Could not Connect My Sql:' .mysql_error());
	}
?>

Step 2: Forgot Password in PHP

index.php

<?php
session_start();
include_once 'dbConfig.php';
if(isset($_POST['submit']))
{
    $member_id = $_POST['member_id'];
    $result = mysqli_query($conn,"SELECT * FROM member_details where member_id='" . $_POST['member_id'] . "'");
    $data = mysqli_fetch_assoc($result);
	$fetch_member_id=$data['member_id'];
	$email_id=$data['email_id'];
	$password=$data['password'];
	if($member_id==$fetch_member_id) {
				$to = $email_id;
                $subject = "Password";
                $txt = "Your password is : $password.";
                $headers = "From: [email protected]" . "\r\n" .
                "CC: [email protected]";
                mail($to,$subject,$txt,$headers);
			}
				else{
					echo 'invalid memberid';
				}
}
?>
<!DOCTYPE HTML>
<html>
<head>
<style type="text/css">
 input{
 border:1px solid olive;
 border-radius:5px;
 }
 h1{
  color:darkgreen;
  font-size:22px;
  text-align:center;
 }

</style>
</head>
<body>
<h1>Forgot Password<h1>
<form action='' method='post'>
<table cellspacing='5' align='center'>
<tr><td>member id:</td><td><input type='text' name='member_id'/></td></tr>
<tr><td></td><td><input type='submit' name='submit' value='Submit'/></td></tr>
</table>
</form>
</body>
</html>

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about forgot password in php.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Pakainfo
Pakainfo

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I’m a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Also Read This πŸ‘‰   create json object in javascript - how to build json object in javascript?

Related posts:

  1. how to create forgot password Recovery (Reset) in php and MySQL?
  2. Reset Password Form Free bootstrap Widget Template
  3. PHP Password protected Web Page
  4. Multiple image slider in html source code
  5. PHP Sending Mail Contact Form with jQuery AJAX
  6. how to show error messages below the textbox in javascript validation?
  7. Validate Email Password Using jQuery
  8. jQuery Show Popup Message Few Seconds then hide
  9. How To Create Image Hover Overlay Effects?
Also Read This πŸ‘‰   How to get the browser viewport height and width dimensions?
forgot password code in php with mailforgot password in phpforgot password in php mysqliforgot password in php using phpmailerforgot password php codelogin-signup-with-forgot-password-in-phpsend reset password link email phpsimple forgot password code in php

Post navigation

Previous Post:Moviesda Download HD Tamil Isaimini Movies 2020
Next Post:Update Data in MySQL Using PHP

Search

Write For Us

We’re accepting well-written informative guest posts and this is a great opportunity to collaborate.
Submit a guest post to [email protected]
Contact Us

Freelance web developer

Do you want to build a modern, lightweight, responsive website quickly?
Need a Website Or Web Application Contact : [email protected]
Note: Paid Service
Contact Me

Categories

3movierulz (56) Ajax (464) AngularJS (377) ASP.NET (61) Bollywood (100) Codeigniter (175) CSS (98) Earn Money (61) Education (56) Entertainment (121) fullform (82) Google Adsense (62) Highcharts (77) Hollywood (101) JavaScript (1356) Jobs (40) jQuery (1422) Laravel (1087) LifeStyle (51) movierulz4 (55) Mysql (1029) Mysqli (890) Node.js (39) php (2117) Programming (2330) Python (96) ReactJS (37) Software (135) Software (83) Stories (94) tamilrockers (96) Tamilrockers kannada (56) Tamilrockers telugu (55) Tech (132) Technology (2378) Tips and Tricks (113) Tools (169) Top10 (390) Trading (69) Trending (63) VueJs (250) Web Technology (93) webtools (174) wordpress (166) World (211)

Advertise With Us

Increase visibility and sales with advertising. Let us promote you online.
Click Here

A To Z Full Forms

Access a complete full forms list with the meaning, definition, and example of the acronym or abbreviation.
Click Here

  • Home
  • About Us
  • Terms And Conditions
  • Write For Us
  • Advertise
  • Contact Us
  • Youtube Tag Extractor
  • Guest Posting Sites
  • Increase Domain Authority
  • Social Media Marketing
  • Freelance web developer
  • Tools
Pakainfo 9-OLD, Ganesh Sco, Kothariya Ring Road, Chokadi, Rajkot - 360002 India
E-mail : [email protected]
Pakainfo

Β© 2022 Pakainfo. All rights reserved.

Top
Subscribe On YouTube : Download Source Code
We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype YouTube Tag Extractor