i have a form that submits data to a database, i have a function that looks like this:
//connect
foreach ($_POST as $key => $value) {
$_POST[$key] = mysql_real_escape_string($value);
}
now when i post, SOMETIMES i get an error that says this:
Allowed memory size of 268435456 bytes exhausted
i figured out that when i do a linebreak, or press enter in the message field, then that is when it causes the error, otherwise it works normal. any ideas?
Please try to reproduce the error with
Does this print something “unusual” before the “Allowed memory size of 268435456 bytes exhausted” message?
edit and btw: I don’t “like” the way you’re trying to handle the real_escape_string thingy for two reasons: