ah yes, the dread apostrophe (or Single Quote). That's actually a risk for SQL Injection attacks, and should be addressed ASAP.
EVERY field coming in from the screen that is incorporated into an SQL query should be run through a function to safety pad the value before it is concatenated to the query. I cannot stress that enough.
forex:
$val = $POST["txtName"];
$sql = "select * from Names where Name like '" + $val + ';"
this means that I can type "';drop database YourDB; select '" into the txtName text box on the screen and get it to run my bit of SQL to drop your database, or something else.
I'd have to look up the best recommendation for PHP, in general it's using a function like quotesmart() or just replacing all single quotes with a pair of single quotes.
$val = quotesmart($FORM["txtName"]);
Yeah, we have a programmer doing this. No point talking to me on how to program for PHP - I wouldn't even begin to understand it! Goes right over my head!

Last edited: