Wow, I had no idea. I just assumed the escape slashes were written to the DB and continued the original convention of inserting with addslashes and running all extracted fields through stripslashes before outputting to the browser.
PHP.net states about mysql_real_escape_string(): "Use of this...
Some time back, I inherited a project where the original coding used addslashes/stripslashes to escape/unescape text in/out of MySQL. I've continued to use that method of escaping and have only just now come across a problem with it.
To insert the original string
O'Brian says "Don't do...
This turned out to be a cookie issue. I always accessed the site with www.sitename.com and that's how the link in the email reads. Turns out my client always logs into sitename.com (no www) and his valid session cookie for sitename.com wsn't valid for the emailed URL www.sitename.com. Once I had...
I have a PHP script that sends an email to a user. The email contains a link back to the PHP application (a custom web-based office management suite).
The office manager app requires a valid PHP session before it'll serve up the page that the email linked to (or indeed, any page).
With an...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.