Broad overview, flowchart on escaping user submitted content for html, javascript, and PHP
can anyone point me to good stackoverflow answers and other resources, including books, on  escaping user submitted content for html, javascript, and PHP?  For example, say a user types information in a text box, and clicks a submit button  Then the text is written by javascript into a div on the page, and is also sent via GET to PHP, and by PHP is put into a MySQL database.  I am looking for a good, broad, but also detailed overview all the different types of escaping involved.   A flowchart would help too!  Thanks!
Broad overview, flowchart on escaping user submitted content for html, javascript, and PHP
===

can anyone point me to good stackoverflow answers and other resources, including books, on  escaping user submitted content for html, javascript, and PHP?  For example, say a user types information in a text box, and clicks a submit button  Then the text is written by javascript into a div on the page, and is also sent via GET to PHP, and by PHP is put into a MySQL database.  I am looking for a good, broad, but also detailed overview all the different types of escaping involved.   A flowchart would help too!  Thanks!