Store in GIT
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
SESSION_START();
|
||||
require('connect.php');
|
||||
|
||||
$code = $_GET['code'];
|
||||
$code = urldecode($code);
|
||||
|
||||
$query = "SELECT * FROM `pass_forgot` WHERE `confirm_mail`='$code'";
|
||||
$result = mysql_query($query, $connection);
|
||||
if(mysql_num_rows($result)==1){
|
||||
$query = "UPDATE `pass_forgot` SET `confirm_mail`=NULL, `mail`=`mail_new`, `mail_new`=NULL WHERE `confirm_mail`='$code'";
|
||||
mysql_query($query, $connection);
|
||||
$_SESSION['confirm']=0;
|
||||
|
||||
$result_rows = mysql_fetch_assoc($result);
|
||||
$name=$result_rows['name'];
|
||||
if(strlen($name)>2){
|
||||
header("Location: ../?page=leerling/$name");
|
||||
}
|
||||
if(strlen($name)==2){
|
||||
header("Location: ../?page=docent/$name");
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
header("Location: ../mail/confirm/?code=1");
|
||||
}
|
||||
Reference in New Issue
Block a user