Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 14:08

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Request] PHP reset PW script

Discussion on [Request] PHP reset PW script within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2012
Posts: 551
Received Thanks: 46
[Request] PHP reset PW script

i want script to reset PW for this website cuz iam noob at PHP
i made some changes by myself but still not so good to make such as script
i also tried to make it but like expected .. failed
thebigbody is offline  
Old 05/19/2015, 08:16   #2
 
elite*gold: 0
Join Date: Feb 2012
Posts: 551
Received Thanks: 46
Update
i made everything but when i write any username and any Email it changes pw without checking if this username is compitable with the email or no
then it change the pw no matter what the email is !?
so what's the solution ?
note : i will upload my php script as soon as i get home
thebigbody is offline  
Old 05/19/2015, 18:33   #3


 
Dracula Untold's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 1,866
Received Thanks: 517
just remove it .
Dracula Untold is offline  
Old 05/19/2015, 22:19   #4
 
elite*gold: 0
Join Date: Feb 2012
Posts: 551
Received Thanks: 46
dude iam trying to add it
thebigbody is offline  
Old 05/21/2015, 23:25   #5
 
elite*gold: 0
Join Date: Feb 2012
Posts: 551
Received Thanks: 46
UPDATE
that's my PHP Script
any help ?
PHP Code:
<?php      
     
        
if(!empty($_GET['action']) && $_GET['action'] == 'logout') {  
            
session_unset();  
            
session_destroy();  
            echo 
"<h1>".$site_name." | Logout page</h1>  
            We are currently logging you out."
;  
            echo 
'<meta http-equiv="refresh" content="1; url=./">';  
        } else {  
          
          

        if(isset(
$_POST['forgetpw'])) {  
               
$username $sec->secure($_POST["username"]); 
               
$youremail $sec->secure($_POST["email"]); 
               
$password_new $sec->secure($_POST["newpw1"]);  
               
$password_new2 $sec->secure($_POST["newpw2"]);  
                

                 
                
#Check User Name# 
                            
if(empty($username)) {  
                
$error[] = 'Please Write Your Username.';  
            } else {  
                if(
strlen($username) < 4)  $error[] = 'Username too short.';  
                if(
strlen($username) > 32$error[] = 'Username too long.';  
            }  
                                        if(empty(
$youremail)) {  
                
$error[] = 'Please Write Your Email.';  
            } else {  
                if(
strlen($youremail) < 4)  $error[] = 'Email too short.';  
                if(
strlen($youremail) > 32$error[] = 'Email too long.';  
            }  
             
                        
#--- New password  ---#  
            
if(empty($password_new)) {  
                
$error[] = 'Please Insert Your New Password.';  
            } else {  
                if(
strlen($password_new) < 4)  $error[] = 'New password too short.';  
                if(
strlen($password_new) > 32$error[] = 'New password too long.';  
                if(!
ctype_alnum($password_new)) $error[] = 'New password contains forbidden symbols.';  
            }  
                                    
#--- New password  ---#  
            
if(empty($password_new2)) {  
                
$error[] = 'Please Insert Your New Password Again.';  
            } else {  
                if(
strlen($password_new2) < 4)  $error[] = 'New password too short.';  
                if(
strlen($password_new2) > 32$error[] = 'New password too long.';  
                if(!
ctype_alnum($password_new2)) $error[] = 'New password contains forbidden symbols.';  
            }  
                        
#--- Check match ---#  
            
if ($password_new && $password_new2) {  
                if(
$password_new != $password_new2)  
                
$error[] = "Passwords do not match.";  
            } 
            
#---Check Email With UserName ---# 
             
            
else { 
            
$check mssql_query("select StrUserID , Email from TB_User where StrUserID = '$username' and Email = '$youremail'"); 
            if (
$check !== 1) { 
                echo 
'Error :'
                echo 
'<br />'
                echo 
"User with following email doesn't exist! <a href = '?page=lostpw'>go back and try again!</a>"
                unset(
$_POST['forgetpw']); 
             } 
             } 
             
#END CHECK  
            
if (@count($error) > 0) {  

            
// CHECK DEM ERRORS  
            
echo '<h1>Error(s)</h1>';  
            
$i 0;  
            for(
$e=0;$e<count($error);$e++) {  
                
$i++;  
                echo 
$i.": ".$error[$e]."<br>";  
                }  
                echo 
"<br><br>";  
            } else {  
                            
$new_pw md5($password_new);  
                  
                
#--- Update password ---#  
                
mssql_query("UPDATE ".$dbName1.".dbo.TB_User set password = '$new_pw', phone = '$password_new' where StrUserID = '$username'") or die("Error inserting new password, try again later.");  
                  
                
#--- Insert into awesome logging system ---#  
                
mssql_query("INSERT INTO ".$dbName5.".dbo.ForgetPW_Log (StrUserID, Email,New_Password, date) VALUES('$username',  '$youremail', '$password_new', '$date')");  
      
     } 
             
             
             
                        
               
        } 
          
      
     


                      echo 
'<h1>'.$site_name.' | Change password</h1>  
            <div class="lostpw">  
                <div class="accbox2">  
        <h2>Reset Your</h2>  
                    <h3>password</h3>  
                    <div class="accInfo">  
                    <form action="?page=lostpw" method="post">  
                            <input type="username" placeholder="Write Your Username" name="username" autocomplete="off" /><br>  
                            <input type="email" placeholder="Write Your Email" name="email" autocomplete="off" /><br>  
                            <input type="password" placeholder="Write New Password" name="newpw1" autocomplete="off" /><br>  
                            <input type="password" placeholder="Write New Password Again" name="newpw2" autocomplete="off" /><br>  
                           <input type="submit" name="forgetpw" value="Reset Your Password" autocomplete="off" /><br>  
                    </form>  
                </div>  
            </div>  
            </div>  
        </div>  
              
              
        '
;  
          
         } 
           
?>
thebigbody is offline  
Old 05/27/2015, 21:47   #6
 
elite*gold: 0
Join Date: Feb 2012
Posts: 551
Received Thanks: 46
up guys please someone help me
thebigbody is offline  
Reply


Similar Threads Similar Threads
script to reset?
03/14/2012 - Dekaron Private Server - 1 Replies
someone could provide me a script for website that I can reset my chars? back the pro level 1 char more with these stats? was looking I saw no more!
24 H Reset script- Fragen!
08/15/2011 - Metin2 Private Server - 0 Replies
Hey leute, ich hab sehr sehr lange kein Metin2 gespielt und will mit einem Comeback hier in die Section zurück aber mit einem Geilem Server. Mein Kollege "MoonStylez", Mein Bruder und ich wollen einen Privat Server mit einem Neuen konzept machen. Das Konzept haben wir schon alles dokumentiert und alles durchgegangen. Wir brauchen das nötige Wissen bzw. die Tutorials zum richtigen "Server aufbau" da wir schon mal vor 1,5 Jahren einen per Hamachi eingerichteten gemacht hatten der aber...
[release] Reset Lost Password Script
05/01/2011 - EO PServer Hosting - 20 Replies
hey all i going release a nice script but there is a little catch on this script it contains out of 2 scripts and a mysql table i do not provide free install service , if you fail to install it on your own then you can request me to do it , but it will not be for free (you get the script already for free :D) http://files.boosterking.com/i/00005/c8us8qa8wbwa .png
[Release] Ip-Reset D2NT-Script!(beta)
10/08/2010 - Diablo 2 - 28 Replies
Soo Leute es ist soweit Hiermit stelle ich die Version 0.97Beta des D2NT-Reconnecters Online! Alle Dateien/Scripts wurden von mir verfasst! Ihr könnt sie gerne scannen! Wollte die Dateien eigentlich openSource anbieten. Jedoch habe ich es schon öfter miterlebt das openSource Programme missbraucht wurden, von 3. Verschlüsselt wurden und weiterverkauft! Somit bekommen hier nur 1 oder 2 Leute denen ich vertraue eine Opensource Version!
IP Reset Script
06/09/2010 - Diablo 2 - 3 Replies
hi, hab mir hier ein kleines ip reset script gemacht für den w-lan router Dlink DI 524. man kann das script auch für jeden anderen router anpassen. ist, denk ich mal für jeden machbar. wen es interessiert,habs mal hochgeladen. ist gut wenn man den AO 4.0 als leechbot noch benutzt oder so. Ihr braucht autoit mfg



All times are GMT +1. The time now is 14:08.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.