Hiding a Form after submitted?

Well, you strip out slashes so that a hacker can not add special code into an input.
Also, same for the specialcharacters function. But, both of these are not really used anymore.
Most programmers now use PDO with PREPARED-STATEMENTS and use filter_input() functions to validate inputs. Using these three items, you are quite safe from hackers. If you do not use these, a hacker could enter in a SQL QUERY command like “DROP TABLE users” and erase your user’s table. Etc… It’s easy to do this if the site does not filter inputs.

Filter_input() function has options to test for numeric, string, email and other values automatically. You would need to study up on them, but, they are easy to follow and simple to implement.

You are welcome! Glad I could help and glad it all works for you now!

1 Like

Ahh so they’re used for security purposes, thank you so much! And I’ll learn more about Filter_input() soon, I’ve learnt so much just from this website! :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service