php form processor for wysiwyg version 12.5.1

Issues related to forms.
Post Reply
WildernessFolk
 
 
Posts: 4
Joined: Sun Apr 29, 2018 5:05 pm

php form processor for wysiwyg version 12.5.1

Post by WildernessFolk » Sun Apr 29, 2018 6:18 pm

When I use the built-in php form processor, the following code appears at the top of my screen above the header.

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

What am I doing wrong? This only happens when I use the php form processor.

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

Re: php form processor for wysiwyg version 12.5.1

Post by Pablo » Sun Apr 29, 2018 6:21 pm

This is problem in your configuration.

Please see the FAQ for more details:
https://www.wysiwygwebbuilder.com/forum ... 10&t=32967

User avatar
Navaldesign
 
 
Posts: 994
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: php form processor for wysiwyg version 12.5.1

Post by Navaldesign » Sun Apr 29, 2018 8:33 pm

Did you set the page to be .php instead of .html ?
www.dbtechnosystems.com

WildernessFolk
 
 
Posts: 4
Joined: Sun Apr 29, 2018 5:05 pm

Re: php form processor for wysiwyg version 12.5.1

Post by WildernessFolk » Wed May 02, 2018 3:12 pm

Navaldesign wrote:
Sun Apr 29, 2018 8:33 pm
Did you set the page to be .php instead of .html ?
Yes, i did.

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

Re: php form processor for wysiwyg version 12.5.1

Post by BaconFries » Wed May 02, 2018 3:17 pm

What is the url to the page? Does your host support php? What type of server are you using? Is it a 'free' server?

WildernessFolk
 
 
Posts: 4
Joined: Sun Apr 29, 2018 5:05 pm

Re: php form processor for wysiwyg version 12.5.1

Post by WildernessFolk » Fri May 04, 2018 3:39 pm

Magic happened overnight :) I no longer see the code. Don't know what I did but everything looks good now. Here is the link to the page anyway file:///C:/Users/Us/AppData/Local/Temp/preview/contactus.php Thank you for working to help me.

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

Re: php form processor for wysiwyg version 12.5.1

Post by BaconFries » Fri May 04, 2018 3:49 pm

The link you gave cannot be used by us, this is because it is a reference to where it is located on your PC so only you can view. A url (live on the internet) is usually written like such http://www.yourwebsite.com/contactus.php

WildernessFolk
 
 
Posts: 4
Joined: Sun Apr 29, 2018 5:05 pm

Re: php form processor for wysiwyg version 12.5.1

Post by WildernessFolk » Sat May 05, 2018 3:16 pm

Oh dear, I knew that. Guess I had another stupid attack. I am in the process of rebuilding the website and this page isn't published yet. However, that code has disappeared. I have had the page set to php since I started building it. Starting to feel like i'm in the Twilight Zone.

Post Reply