How php processes the data submitted by forms is safe. What processing is required for the form data submitted by users to prevent js and SQL injection, prevent repeated submission and illegal submission to filter out the submitted illegal data. please have the complete code. thank you. ------ Solution ------------------ read "PHP and MYSQLWEB development" to get the system started. JS anti-injection: htmlspecialcharsSQL prevents php from handling data submitted by forms.
What processing is required for the form data submitted by the user to prevent js and SQL injection and prevent repeated and illegal submission?
How can I filter out the submitted illegal data? I hope the complete code is available. thank you.
------ Solution --------------------
Read "PHP and mysql web development" and you will be able to master the system.
JS anti-injection: htmlspecialchars
SQL Injection Prevention: mysql_real_escape, addslashes
Illegal data filtering: you must check your own coding rules. if you want to check the rules, write your own code, use regular expressions, trim, isset, empty, and so on.
Prevent unauthorized submission: self-built coding. The order is isset, trim, empty, and other verifications.
Repeated submission: generate a unique ticket in the SESSION, add the ticket to the hidden of the form, submit the form, and verify that it is consistent.