Hi
I think you need to use eval() on the if line and the one following it. And laserlight is right about the middle part of the for needing a < not an =
eval("if (!empty(\$pro$i))");
what this SHOULD do is look for variables and replace them. The escape in front of the $pro leaves this as is, but the $i becomes the number. So the code becomes:
$pro1=addslashes($_POST['pro1']);
$pro2=addslashes($_POST['pro2']);
$pro3=addslashes($_POST['pro3']);
$pro4=addslashes($_POST['pro4']);
$pro5=addslashes($_POST['pro5']);
for ($i=1;$i<=5;$i++){
eval("if (!empty($pro\$i))")
eval("$pros.=\"$pro\$i\\n\";");
}
echo nl2br($pros);
I think.
Trevor