Sorry, I thought you guys knew it. I will go with the real professional ... Google.
I could have told you to use mysql_real_esca pe_string but then again best is relative and Google should have all the options where you can then take your pick.
Best is relative to what kind of data you are expecting.
The mysql_real_esca pe_string function will work most of the time, but in some cases a simple regex check will do better. In other cases simply checking whether a variable is of a specific type is enough.
Comment