I am trying to create code that takes variables submitted from a form and runs them through addslashes before replacing them. This is so I can submit them to a MySQL database. What I have below does not work. I am fairly new to this and not sure how to name a variable in a loop and replace its value.
while (list($name, $value) = each($HTTP_POST_VARS)) {
$HTTP_POST_VARS[$value] = addslashes($value);
}
Any help very much appreciated.