I have only been uploading pages via BV, via my VH account. I thought that when you uploaded a page with a form on it, it would end up being saved as a .php page. But, I am trying to do that and it is being saved as a .html page. It has now sort of uploaded, but all the following is showing at the top of the page. Please help if you can figure out what i am doing wrong. I am going to play again tonight, but dont see how I get the account to recognise it as form page. I did have it working properly, but with a new page now, it seems to have gone a bit pete tong.
"; } if (!empty($error)) { $errorcode = file_get_contents($error_url); $replace = "##error##"; $errorcode = str_replace($replace, $error, $errorcode); echo $errorcode; exit; } $internalfields = array ("submit", "reset", "filesize", "upload_folder", "send", "captcha_code"); $message .= $eol; $message .= "IP Address : "; $message .= $_SERVER['REMOTE_ADDR']; $message .= $eol; foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { if (!is_array($value)) { $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } else { $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; } } } $body = 'This is a multi-part message in MIME format.'.$eol.$eol; $body .= '--'.$boundary.$eol; $body .= 'Content-Type: text/plain; charset=ISO-8859-1'.$eol; $body .= 'Content-Transfer-Encoding: 8bit'.$eol; $body .= $eol.stripslashes($message).$eol; if (!empty($_FILES)) { foreach ($_FILES as $key => $value) { if ($_FILES[$key]['error'] == 0 && $_FILES[$key]['size'] <= $max_filesize) { $body .= '--'.$boundary.$eol; $body .= 'Content-Type: '.$_FILES[$key]['type'].'; name='.$_FILES[$key]['name'].$eol; $body .= 'Content-Transfer-Encoding: base64'.$eol; $body .= 'Content-Disposition: attachment; filename='.$_FILES[$key]['name'].$eol; $body .= $eol.chunk_split(base64_encode(file_get_contents($ _FILES[$key]['tmp_name']))).$eol; } } } $body .= '--'.$boundary.'--'.$eol; mail($mailto, $subject, $body, $header); header('Location: '.$success_url); exit; } ?>
Comment