/ Published in: PHP
This set of functions makes it quicker for me to code, might be useful to someone else =]
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function clean($var){ return (get_magic_quotes_gpc()) ? stripslashes(mysql_real_escape_string($var)) : mysql_real_escape_string($var) ; } function grab_postvar($index, $clean = true){ } /* Usage: $post_variable = grab_postvar("id"); | Returns the variable else returns boolean false */ function grab_getvar($index, $clean = true){ } /* Usage: $get_variable = grab_getvar("id"); | Returns the variable else returns boolean false */ function grab_referer($default = NULL){ } /* Usage: $referer_url = grab_referer("index.php"); */