# Copyright (c) 2007 Erwan Briand # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # ***** END LICENSE BLOCK ***** session_start(); require_once("include/config.inc.php"); $code = $_POST['titre']; $pass1 = $_POST['op']; $pass2 = $_POST['po']; if($pass1 != $pass2) { exit("Error."); } $mdp = md5($pass1); $ma = mysql_query("SELECT * FROM member WHERE passe = '$code' "); if (mysql_num_rows($ma) == 0) { exit("Error."); } $mb = mysql_fetch_array($ma); $pSS = $mb['pseudo']; mysql_query("UPDATE member SET passe='$mdp' WHERE passe='$code' ") or die (mysql_error()); Header("Location: motpasse_".$lang.".php?ps=oui"); ?>