Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /** Basic SQLi protection by escaping
- *\
- function sanitize ($value)
- {
- if( get_magic_quotes_gpc() )
- {
- $value = stripslashes( $value );
- }
- if( function_exists( “mysql_real_escape_string” ) )
- {
- $value = mysql_real_escape_string( $value );
- }
- else
- {
- $value = addslashes( $value );
- }
- return $value;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement