Jump to content

echo syntax error.


jamesxg1

Recommended Posts

Hiya peeps!

 

Heres the code.

 

foreach($_POST as $key => $val):
echo '\$' . $key . ' = mysql_real_escape_string(trim(addslashes(\$_POST[' . $key . '])));<br />';
foreach;

 

Heres whats returned.

 

Parse error: syntax error, unexpected ';', expecting '(' in *** on line 12

 

I dont understand, I have escaped all vars.

 

Many thanks

 

James.

 

Link to comment
https://forums.phpfreaks.com/topic/194204-echo-syntax-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.