Training, Open Source computer languages

PerlPHPPythonMySQLhttpd / TomcatTclRubyJavaC and C++LinuxCSS

Search our site for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
String overview - Form to variable to SQL ... to variable to HTML

String overview - Form to variable to SQL ... to variable to HTML

When you collect a variable from a form in PHP, chances are that magic quotes will have included extra backslashes in the string to protect any quotes from causeing a problem when you write your data into a database using SQL. Then when you call your data back, from the database, you'll need to strip out the slashes and protect any of the HTML special characters prior to display. Once you understand how the various elements go together, it's all very simple and logical ... but before you do you're liable to be quite worried when you read other people's code contain a whole series of stripslashes and htmlentities function calls. This picture is taken from our PHP course and showone of the diagrams we use to help ensure that all of our trainees leave with the understanding that they need.

Associated topic - String Handling in PHP

Next ... random image ... a slide show ... image from list below


© WELL HOUSE CONSULTANTS LTD., 2008: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho