lth2h wrote:Not good 🙁
You should always validate your input. Make sure it is within the allowed values and follows whatever special format may be required. Use addslashes, mysql_escape_string, or other similar functions.
Sorry. but I disagree. The stuff which is submitted, is not interpreted. Untill you tell the browser to do so. The submitted values are treated as text, and not compiled by PhP. The problem comes when you start using a database, because THEN the code is interpreterd -> By your database engine to be exact. That is when the addslashes etc becomes an issue.
So if I would submit "print_r($_SESSION);\n\r echo"$username $password $security";"
then exactly that would be echoed out if nothing else happens. As for cookies: Your cookies are on the userts HD and always readable if people want: Do not store sensitive data in it.
My 2 cts, anyone plkease correct me if I am wrong.