View Single Post
  #5  
Old 21st October 2019, 19:39
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Default
Just sanitize the variables in SQL query where necessary sqlesc() or mysqli_real_string_escape() if you have converted over to mysqli and I believe try to use trim() around:

PHP Code:
$md5 $_GET["secret"]; 
$email $_GET["email"]; 
$sec $row["editsecret"]; 
SQL ESC
PHP Code:
$res SQL_Query_exec("SELECT `editsecret` FROM `users` WHERE `enabled` = 'yes' AND `status` = 'confirmed' AND `id` = '".sqlesc($id)."'"); 
[
B]AND[/B]
SQL_Query_exec("UPDATE `users` SET `editsecret` = '', `email` = ".sqlesc($email)." WHERE `id` = ' " sqlesc($id)."' AND `editsecret` = " sqlesc($row["editsecret"])); 
NOT TESTED YET WILL TRY WHEN PC HAS ARRIVED
Reply With Quote