Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[TuT] Extremely easy SQL injection prevention, PHP

PHP Code

<?php 
function cleanstring($query){
if(
get_magic_quotes_gpc()){ $string = stripslashes($query);}
if (
phpversion() >= '4.3.0'){ $query = mysql_real_escape_string($query); 
}else{
$string = mysql_escape_string($string); }
return 
$string;
} 
Looks good mate. Will definitely check It out.
Thanks for the share :)
How is that not extremely easy.

PHP Code

<?php 
"WHERE ID = '" . cleanstring($query) . "'"; 
@Steven, was it nulled vB? The nuller probably has some sort of shit going on in there, if so.
(Feb 17, 2011 03:19 AM)steven44 Wrote:  the person thretened tht if i ban them the site would be coming down

So why didn't you give their IP to the police? Threats like that are illegal.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by curlOct 19, 2023 12:53 PM 0 130 Oct 19, 2023 12:53 PM
Last Post: curl
by EmbouteilleAug 7, 2016 10:51 PM 9 182 Aug 7, 2016 10:51 PM
Last Post: devd
by ultimatelittlemasterJan 2, 2015 01:15 PM 3 112 Jan 2, 2015 01:15 PM
Last Post: Crypto™