mysql_escape_string question

rdiavh

New Member
Just a quick query really, In my PHP file, I have variables coming from my HTML form, like so:\[code\]$companyName = mysql_escape_string($_POST['compName']);$AddLine1 = mysql_escape_string($_POST['add']);$AddLine2 = mysql_escape_string($_POST['add1']); $AddLine3 = mysql_escape_string($_POST['add2']);\[/code\]Throughout this script, I do a few select, insert statements with mysql. What I'm wondering is, is it okay to just use the mysql_escape_string once like above, or do I need to do it every time I use the variable?Probably a really simple (or silly) question but I said I'd ask anyway.
 
Back
Top