Strange text in top of browser.

Issues related to previewing and publishing your web site.
Post Reply
Pierre Van Hoof
 
 
Posts: 2
Joined: Mon Sep 17, 2018 11:31 am

Strange text in top of browser.

Post by Pierre Van Hoof » Mon Sep 17, 2018 11:44 am

I create a blanco new project.
I use the predefined "contactForm" from the forms.
Left you have a google map right you have "Mail us" (the 6° form)

This is the only thing you find on that page.

When I press F5 within Web builder (updated with last version)
The form is show perfectly.

When I publish the form on my PC en start using "index" a disturbing message is displayed on top of the browser.

What I'm I doing wrong??



This is the displayed message:

"; } if (!empty($error)) { $errorcode = file_get_contents($error_url); $replace = "##error##"; $errorcode = str_replace($replace, $error, $errorcode); echo $errorcode; exit; } $internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response"); $message .= $eol; $message .= "IP Address : "; $message .= $_SERVER['REMOTE_ADDR']; $message .= $eol; $logdata = ''; 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) { $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; if ($mailto != '') { mail($mailto, $subject, $body, $header); } header('Location: '.$success_url); exit; } ?>

User avatar
Pablo
 
Posts: 14529
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Strange text in top of browser.

Post by Pablo » Mon Sep 17, 2018 12:10 pm

This is the code of the form processor.
- make sure the page extension is set to PHP
- make sure the server supports PHP

Related FAQ:
https://www.wysiwygwebbuilder.com/forum ... 10&t=32967

User avatar
BaconFries
 
 
Posts: 4189
Joined: Thu Aug 16, 2007 7:32 pm

Re: Strange text in top of browser.

Post by BaconFries » Mon Sep 17, 2018 12:11 pm

This is not strange text this indicates that you are using a 'Form' as this uses php then the page extension should be set to .php rather than .html
When I publish the form on my PC en start using "index" a disturbing message is displayed on top of the browser.
Also note for reference you cannot 'Preview' php locally you will first need to publish to your host/server to see the results.

Pierre Van Hoof
 
 
Posts: 2
Joined: Mon Sep 17, 2018 11:31 am

Re: Strange text in top of browser.

Post by Pierre Van Hoof » Mon Sep 17, 2018 12:49 pm

That simple :-)

Thanks for the help

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests