ok

Mini Shell

Direktori : /home2/selectio/public_html/salemgovtitialumni.in/
Upload File :
Current File : /home2/selectio/public_html/salemgovtitialumni.in/new-password.php

<?php include 'header.php';

$error_message="";
if(isset($_POST['login'])) {

      $ids = $_POST['ids'];
      
                    if(empty($_POST['new_password']) || empty($_POST['confirm_password'])) {
                        $error_message = 'Mobile No or Password can not be empty';
                    } 
                    else {
                		
                		$new_password = strip_tags($_POST['new_password']);
                		$confirm_password = strip_tags($_POST['confirm_password']);
                		
                if($new_password==$confirm_password){
                
                    	$statement = $pdo->prepare("UPDATE `tbl_member` SET `password`=? WHERE id=?");
                        $result = $statement->execute(array($new_password, $ids)); 
                        
                        echo "<script>
                                        window.location.href='login.php';
                                    </script>";
                        
                }else{
                    
                    echo "<script>
                                        alert('Password Incorrect');
                                    </script>";
                }        
              
                    }
                
                    
                }
                ?>

        <!-- Login & Register Start -->
        <div class="section login-register-section section-padding">
            <div class="container">
                <div class="row">
                <div class="col-lg-12">
                <!-- Login & Register Wrapper Start -->
                <div class="login-register-wrap">
                    <div class="container">
                    <div class="row" style="display: flex;justify-content: center;">
                        <div class="col-lg-6"  style="margin-top: 125px;" >

                            <!-- Login & Register Box Start -->
                            <div class="login-register-box">
                                <!-- Section Title Start -->
                                <div class="section-title">
                                    <h2 class="title">Member Login</h2>
                                </div>
                                <!-- Section Title End -->

                                <div class="login-register-form">
                                    <form action="#" method="post">
                                        <div class="single-form">
                                            <input type="hidden" name="ids" value="<?=$_GET['id']?>">
                                            <input type="text" name="new_password" class="form-control" placeholder="New Password">
                                        </div>
                                        <div class="single-form">
                                            <input type="password" name="confirm_password" class="form-control" placeholder="Confirm Password">
                                        </div>
                                        <div class="single-form">
                                            <p style="color:red;"><?= $error_message ?></p>
                                        </div>
                                        <!--<div class="single-form form-check">
                                            <input class="form-check-input" type="checkbox" value="" id="flexCheckDefault">
                                            <label class="form-check-label" for="flexCheckDefault">Remember me</label>
                                            
                                    </div>-->
                                        <div class="form-btn">
                                            <button name="login" class="btn">Login</button>
                                        </div>
                                        
                                        
                                        
                                    </form>
                                </div>
                            </div>
                            <!-- Login & Register Box End -->

                        </div>
                    </div>
                    </div>
                </div>
                <!-- Login & Register Wrapper End -->
                 </div>
                 </div>
            </div>
        </div>
        <!-- Login & Register End -->

<?php include 'footer.php' ?>

Zerion Mini Shell 1.0