Register for your free account! | Forgot your password?

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

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

Advertisement



Anti Injection On Register

Discussion on Anti Injection On Register within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2011
Posts: 303
Received Thanks: 43
Anti Injection On Register

PHP Code:
function anti_injection($sql) {
$sql preg_replace(sql_regcase("/(from|select|insert|delete|where|'|\"|drop table|show tables|#|\*|--|\\\\)/"),"",$sql);
$sql trim($sql);
$sql strip_tags($sql);
$sql addslashes($sql);
return 
$sql;
}
$username=anti_injection($_POST['username']);
$password=md5($_POST['password']);
$password2=anti_injection($_POST['password']);
$playername=anti_injection($_POST['playername']);
$email=anti_injection($_POST['email']); 
Blah Blah Blah
Serenduk is offline  
Reply


Similar Threads Similar Threads
[RELEASE] Register Script (with anti SQL inject)
07/16/2014 - Dekaron Private Server - 19 Replies
Register script with Anti SQL inject, no ODBC ! DO NOT USE THIS SCRIPT! Have fun :)
Welcher Anti-SQL-Injection-Code ist sicherer?
07/19/2010 - General Coding - 5 Replies
Ich beschäftige mich schon seit längerem mit Privatserver HPs, nun meine Frage: Was ist sicherer? <?php function anti_injection($sql) { $sql = preg_replace(sql_regcase("/(from|select|inser t|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"",$sql); $sql = trim($sql); $sql = strip_tags($sql); $sql = addslashes($sql);



All times are GMT +2. The time now is 10:04.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.