1. Removes all spaces.
2. Replaces anything other than a number with nothing ('').
3. removes any decimal input (i.e. if 1302.921 is passed then return just 1302).
4. mysql_real_escape_string()'s the variable.
This may not be practical or may sound a bit simple but, I just am struggling to see where and how from tutorials on Google that you pass variables from your code to a function.