Results 1 to 3 of 3

Thread: Publishing Forms
      
   

  1. #1
    B1uenose is offline Special Status
    Join Date
    Apr 2008
    Location
    Scotland
    Posts
    28

    Default Publishing Forms

    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; } ?>


  2. #2
    B1uenose is offline Special Status
    Join Date
    Apr 2008
    Location
    Scotland
    Posts
    28

    Default Re: Publishing Forms

    Hi, I have searched the forums and cant find an answer to this. I just watched the tutorial again and it simply tells you to save a form page as normal, and that a page containing a form will publish as a php page instead of a html page, automatically, But thats not happening for some reason.

    The site is here www.nisus-training.co.uk and the only 2 live pages at the mo are the index and the contact us. I am sure it will be obvious to someone what has happened here or what i am doing wrong.

  3. #3
    Vasili's Avatar
    Vasili is offline Moderator
    Join Date
    Mar 2006
    Posts
    14,189

    Default Re: Publishing Forms

    You are not following the Tutorial precisely, as it clearly emphasizes the importance of selecting in FORM PROPERTIES (reveal Form Properties by double-clicking on Form Area) under FORM PROCESSING the option "Use built-in PHP processor to send the data to an email address" .... this will change the manner in which the page is published by resetting the page extension, specifically to a ".php" page and not a ".html" page that you have been publishing (and the reason the PHP script is both not functional and displaying ON the page instead as PART OF THE PAGE CODE).
    . VodaWebs....Luxury Group
    * Success Is Potential Realized *

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49