When i submit my code i get this warning:
Invalid argument supplied for foreach() in /home/a5909939/public_html/ordernow.php on line 262
Heres the code around it:
$Body .= "Ordertotal: ";
$Body .= $Ordertotal;
$Body .= "\n";
$body .= '--'.$boundary.$eol;
$body .= 'Content-Type: text/plain; charset=iso-8859-1'.$eol;
$body .= 'Content-Transfer-Encoding: 8bit'.$eol;
$body .= $eol.stripslashes($message).$eol;
foreach ($_FILES['userfile']['error'] as $i => $error) {
if ($error == 0 && $_FILES['userfile']['size'][$i] <= $max_size) {
$body .= '--'.$boundary.$eol;
$body .= 'Content-Type: '.$_FILES['userfile']['type'][$i].'; name='.$_FILES['userfile']['name'][$i].$eol;
$body .= 'Content-Transfer-Encoding: base64'.$eol;
$body .= 'Content-Disposition: attachment; filename='.$_FILES['userfile']['name'][$i].$eol;
$body .= $eol.chunk_split(base64_encode(file_get_contents($_FILES['userfile']['tmp_name'][$i]))).$eol;
$attached[] = $_FILES['userfile']['name'][$i];
}
}
PLEASE SOMEBODY HELP!