Quote:
Originally Posted by imvain2
Depending on what you really want to do, you have a few options.
You could always use strip_tags to remove those tags.
You could simply do a string replace and replace < with the <X and the > with >X (I didn't know if the forum would show my character entities correctly or not so replace the X with a semi colon.
Or if you really want to reject, simply use the strpos to detect the exact symbols, if they are found, redirect the user with a message telling them they entered bad characters or if the text is clean then add to the database.
|
Yes, I am interested in knowing how to use the strpos to detect the exact symbols and redirect user to a message that they have entered bad characters and to re-enter them again. As I am not very familiar of how to write this, appreciate if you can give me the sample code where I can use to implement this checking. Sorry if I am asking too much as I am totally blurred on this.
Thanks!