What would I do without you folks! I hope I learn enough so I can eventually pay it forward. But in the meantime...
OK here's the problem:
I'm creating a dynamic select list that ends up pulling items from the data base that contain an apostrophe (as in the word "Alzheimer's").
so php generates the following html:
<option value='aging'>aging</option>
<option value='Alzheimer's'>Alzheimer's</option>
<option value='antacids'>antacids</option>
....
Of course when "Alzheimer's" is sent as a variable it mucks up the works and destroys the query I'm sending it to.
Now I know if I was to create the option manually, I'd escape the ' with a slash. Is there a way to escape it programatically as I'm pulling it from the database to populate the select list?
Or do I have to change the stuff in the data base so that it pre-escaped?
(I'm feeling like maybe I have a touch of Alzheimer's) :queasy: