[phorm] [Phorm:] Re: non standard characters

  • From: webbbs@xxxxxxxxx
  • To: support@xxxxxxxxx
  • Date: 2 Jun 2003 02:21:54 -0000

The following new message has been posted on Phorm Support Forum at 
<http://www.phorm.com/support/>. 

*************************************************************************** 

  MESSAGE:  (#2768) Re: non standard characters 
            <http://www.phorm.com/support/?rev=2768> 
  AUTHOR:   Patrick O'Hara 
  DATE:     June 1, 2003 at 10:21 p.m. EST 

  Reply To: (#2767) 
  Author: 
  Date: 

> What lines exactly would I need to add to my local 
> phorm config file to, say, stop << I'm going 
> >> from coming aout as << I\'m going 
> >>? 

What happens, is that PHP has the capability to escape the ' character when it 
is passed from the form, so it comes out the other end as \' and in order to 
get rid of it, we need to use the strip_slashes() function. 

Phorm makes use of the variable that is the same as the form field name. i.e. 
if there is a form field called notes and it has "I'm going" in it, Phorm 
(PHP) will have a variable $notes that will have the value "I\'m going". To 
get rid of the slash, we put the following line into the config file, which is 
one of the first things that gets executed, and we can alter the variables 
that Phorm (PHP) will use. 

$notes = strip_slashes($notes); 

Note that this is purely a PHP statement and has no relation to Phorm, apart 
from the fact that we are using it to modify one of the variables used by 
Phorm. 

Hope this clarifies the problem. Check out the PHP documentation if you are 
still having problems. 

www.php.net 

Regards, 

Patrick O'Hara 
WhitsundayIT 
QLD, Australia 

patrick@xxxxxxxxxxxxxxxx 
www.whitsundayit.com 

*************************************************************************** 

This is an automatically-generated notice.  If you'd like to be removed from 
the mailing list, please visit Phorm Support Forum at 
<http://www.phorm.com/support/>, or send your request to webbbs@xxxxxxxxxx  If 
you wish to respond to this message, please post your response directly to the 
board.  Thank you! 
-------------------------------------------------
You are receiving this message because you are subscribed to the Phorm mailing 
list. To send messages to the mailing list, simply send email to 
phorm@xxxxxxxxxxxxx from the address you have subscribed. You may unsubscribe 
from the list by sending email to phorm-request@xxxxxxxxxxxxx with 
'unsubscribe' in the SUBJECT field.

Other related posts: