Click to See Complete Forum and Search --> : Database inserts not working properly


difrad76
06-20-2006, 10:37 AM
Setup: We have a MS SQL Server 2000 Database as a backend. We use PHP as a front end.

I validate every field that has to be entered into the database for a '(quote) . I want it to be replaced by '' (double quotes). This how I do that str_replace("'","''",$_REQUEST["url"])
However '(single quote) is being replaced by \' instead of ''(double quotes). I tried to turn off magic quotes
ini_set("magic_quote_gpc","Off"); ini_set("magic_quotes_runtime","Off");

Didn't work. How do I fix this minor annoying issue?

Thanks