Well recently I created a simple register script that saves the user name/password along with some other information into a text file. It works great except for one thing, some people user invalid characters in their user name (¿, ñ, ╥, etc.) causing server errors, and I need a fix for it because I simply can't think of one. Thanks in advance!
Try this function to test if a string is alpha numeric. http://ca3.php.net/manual/en/function.ctype-alnum.php
Or, also you could make a function with an array that contains all your acceptable characters and test the strings against it.