I have just bought this software, and am reasonably impressed with it. I have completed my first website, but when I preview it, I get a lot of, what i assume is, error code on top of the preview. I cant make heads or tails out of it.
I used a template provided by WYSIWYG, and removed or changed it quite a bit.
I need help. I have done this website for a friend, and want to get this done so I can send it off.
Below is the error code.
"; throw new Exception($error); } $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)) . " : " . implode(",", $value) . $eol; } else { $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } } } $body = 'This is a multi-part message in MIME format.'.$eol.$eol; $body .= '--'.$boundary.$eol; $body .= 'Content-Type: text/plain; charset=UTF-8'.$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); } catch (Exception $e) { $errorcode = file_get_contents($error_url); $replace = "##error##"; $errorcode = str_replace($replace, $e->getMessage(), $errorcode); echo $errorcode; } exit; } ?>
I think it has to do with the contact form I have done, but I cannot understand where I went wrong, or how to rectify it.
ANY help would be greatly appreciated.
Unknown code on top of page preview
Forum rules
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
-
Centaur11
-

- Posts: 5
- Joined: Sat Aug 15, 2026 5:35 am
Re: Unknown code on top of page preview
I think I have worked it out. It seems I had used php for the form, but now that I have taken that back to html, all seems good, but now I dont know if my contact form will work correctly. I have tried it in preview form, but it brings up my own email client (of course), but no subject line or form data is in the body of email, and I cant seem to get that info into the email from the form.
Is there a way i can test this contact form to make sure it all works.
Is there a way i can test this contact form to make sure it all works.
- Pablo
- Posts: 24813
- Joined: Sun Mar 28, 2004 12:00 pm
- Location: Europe
- Contact:
Re: Unknown code on top of page preview
This is the PHP script of the form. If the page uses PHP then you will need to set the page extension to PHP.
See also the FAQ:
https://forum.wysiwygwebbuilder.com/vie ... hp?t=32967
See also the FAQ:
https://forum.wysiwygwebbuilder.com/vie ... hp?t=32967
-
Centaur11
-

- Posts: 5
- Joined: Sat Aug 15, 2026 5:35 am
Re: Unknown code on top of page preview
I tried setting the pages to php, but then the menu on the main page did not work. It would not find the index page, but when I changed back to html, all the menu items worked.
Is there a way to use php for the contact form, change extenson for the pages to php, and still have the page menu still work?
Oh, and not get the above code to come back.
Is there a way to use php for the contact form, change extenson for the pages to php, and still have the page menu still work?
Oh, and not get the above code to come back.
- AliGW
-

- Posts: 750
- Joined: Thu Dec 19, 2024 3:41 pm
Re: Unknown code on top of page preview
Which menus are you using?
Ali
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
- Pablo
- Posts: 24813
- Joined: Sun Mar 28, 2004 12:00 pm
- Location: Europe
- Contact:
Re: Unknown code on top of page preview
If you change the page extension then you will have to republish all pages that are referring to that page, otherwise they still have the old link.
-
Centaur11
-

- Posts: 5
- Joined: Sat Aug 15, 2026 5:35 am
Re: Unknown code on top of page preview
I have changed back to php, and republished the page items in the menue setp, but now when I go to preview, it wont open, just asks what to open with. So i set default programme for .php to Chrome, now it just shows code, and not the web page for preview.
This webpage design and webpage construction is full of pit falls.
This webpage design and webpage construction is full of pit falls.
-
Centaur11
-

- Posts: 5
- Joined: Sat Aug 15, 2026 5:35 am
Re: Unknown code on top of page preview
I am using panel meus.
- BaconFries
-

- Posts: 6349
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Unknown code on top of page preview
You cannot "Test" "Preview" php locally it must be uploaded to your host/server for it to work due to the php needs to be processed there. It will also require that your host supports php if not then then it can't run.Is there a way i can test this contact form to make sure it all works.