Not sure if this is the right place. But..
How do remove html/other uncessary tags in php? Do I use strip tags? I've read tutorials, but I don't know how to apply it to my script.
Basic idea of my script: (actual script is too long to post it all)
First, it is an html form for the user to enter a 'short message'.
It gets compared with the 'correct message' (using php if/else), and if it's right, they get redirected elsewhere.
And I have several pages set up like this, with many different variables in total.
I've read that you shouldn't trust what the user inputs, so I want to make my script safer. How do I make the input part safer? (The entered 'short message' should only contain letters and numbers. Nothing else.)
I think I have to use strip tag, but I don't really know how or where to use it.
Help is appreciated. Thank you.
How do remove html/other uncessary tags in php? Do I use strip tags? I've read tutorials, but I don't know how to apply it to my script.
Basic idea of my script: (actual script is too long to post it all)
First, it is an html form for the user to enter a 'short message'.
It gets compared with the 'correct message' (using php if/else), and if it's right, they get redirected elsewhere.
And I have several pages set up like this, with many different variables in total.
I've read that you shouldn't trust what the user inputs, so I want to make my script safer. How do I make the input part safer? (The entered 'short message' should only contain letters and numbers. Nothing else.)
I think I have to use strip tag, but I don't really know how or where to use it.
Help is appreciated. Thank you.