| |||||||||||
| |||||||||||
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.
Show a large image More about PHP string handling Associated topic - String Handling in PHP |
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho | |||||||||||