Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!get_magic_quotes_gpc()) {
- if(is_array($_GET)) {
- foreach($_GET as $key1 => $val1) {
- if( is_array($val1) ) {
- foreach($val1 as $key2 => $val2) {
- $val1[$key2] = mysql_real_escape_string(htmlentities(addslashes($val2)));
- }
- }
- else {
- $_GET[$key1] = mysql_real_escape_string(htmlentities(addslashes($val1)));
- }
- }
- }
- if( is_array($_POST) ) {
- foreach($_POST as $key1 => $val1) {
- if( is_array($val1) ) {
- foreach($val1 as $key2 => $val2) {
- $val1[$key2] = mysql_real_escape_string(htmlentities(addslashes($val2)));
- }
- }
- else {
- $_POST[$key1] = mysql_real_escape_string(htmlentities(addslashes($val1)));
- }
- }
- }
- }
- else {
- if( is_array($_GET) ) {
- foreach($_GET as $key1 => $val1) {
- if( is_array($val1) ) {
- foreach($val1 as $key2 => $val2) {
- $val1[$key2] = mysql_real_escape_string(htmlentities(addslashes($val2)));
- }
- }
- else {
- $_GET[$key1] = mysql_real_escape_string(htmlentities(addslashes($val1)));
- }
- }
- }
- if( is_array($_POST) ) {
- foreach($_POST as $key1 => $val1) {
- if( is_array($val1) ) {
- foreach($val1 as $key2 => $val2) {
- $val1[$key2] = mysql_real_escape_string(htmlentities(addslashes($val2)));
- }
- }
- else {
- $_POST[$key1] = mysql_real_escape_string(htmlentities(addslashes($val1)));
- }
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement