vermouth Posted December 9, 2013 Share Posted December 9, 2013 i do not know how to do the forget password, the doForgetPassword php page. which is once i click the submit buttom then will go to the page that shows the message: the password has already send into your email. my code is not show anything inside the page. doForgetPassword.php forgetPassword.php Link to comment https://forums.phpfreaks.com/topic/284641-forget-password-send-password-to-gmail/ Share on other sites More sharing options...
AdRock Posted December 9, 2013 Share Posted December 9, 2013 It looks like you've created a function called doforget() but you don't call it Link to comment https://forums.phpfreaks.com/topic/284641-forget-password-send-password-to-gmail/#findComment-1461747 Share on other sites More sharing options...
vermouth Posted December 9, 2013 Author Share Posted December 9, 2013 why my doforget password page dose not show anything inside? i am so confused about it Link to comment https://forums.phpfreaks.com/topic/284641-forget-password-send-password-to-gmail/#findComment-1461779 Share on other sites More sharing options...
MDCode Posted December 9, 2013 Share Posted December 9, 2013 You would get a lot more help if you posted the code here instead of downloads Link to comment https://forums.phpfreaks.com/topic/284641-forget-password-send-password-to-gmail/#findComment-1461780 Share on other sites More sharing options...
vermouth Posted December 9, 2013 Author Share Posted December 9, 2013 <center><h2>Forget Password ?</h2></center><br/> <center><table border="0" cellpadding="10"> </head> <tr> <td>Username</td> <td><input type="text" name="username" /></td> </tr> <tr> <td>Email</td> <td><input type="text" name="email" /></td> </tr> </table> <div class="form-actions"> <input type="submit" class="btn btn-primary" value="Reset" /> </div> <?php if( isset($info)): ?> <div class="alert alert-success"> <?php echo($info) ?> </div> <?php elseif( isset($error)): ?> <div class="alert alert-error"> <?php echo($error) ?> </div> <?php endif; ?> </fieldset> </form> </div> </body></html> Link to comment https://forums.phpfreaks.com/topic/284641-forget-password-send-password-to-gmail/#findComment-1461781 Share on other sites More sharing options...
vermouth Posted December 9, 2013 Author Share Posted December 9, 2013 <?php function doforget() { $this->load->helper('url'); $email= $_POST['email']; $q = $this->db->query("select * from users where email='" . $email . "'"); if ($q->num_rows > 0) { $r = $q->result(); $user=$r[0]; $this->resetpassword($user); $info= "Password has been reset and has been sent to email id: ". $email; redirect('/index.php/login/forget?info=' . $info, 'refresh'); } $error= "The email id you entered not found on our database "; redirect('/index.php/login/forget?error=' . $error, 'refresh');} ?> <!DOCTYPE HTML><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> </head> <body> <p> <?php echo "<br/>"; ?> <a href="index.php">Home</a> </p> </body></html> Link to comment https://forums.phpfreaks.com/topic/284641-forget-password-send-password-to-gmail/#findComment-1461782 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.