Forum Moderators: coopster
I have seen stripslashes() used often, but what if the user needs a slash in his comment for some reason?
Basically I am trying to figure out how to process the variables to both keep the script from doing anything bad, and to not 'mess up' what the user types no matter what. Is this possible?
I am not using any sort of database, just a simple form which will mail me what they type.
Thanks for any info!
The only thing I am thinking about is future expandability. Once I get the script exactly the way I want it, I plan on creating a little program which will generate a custom version of the script based on the users needs. So they can go through and select what kind of fields they want, what kind of 'checking' they want done on them, what features will be included or not etc.. So you never know.. I might someday require a field in the form that may contain slashes or less-than signs or whatever.
The stripslashes function simply removes those slashes once the data is retrieved. This does not affect anyone using slashes in their messages. It will only remove the slashes that are used to escape problematic quotes. The stripslashes function should always be used when displaying data that has text values from a form, just in case there are any slashes.