RE: [PHP] Maintain and ' in html textfields

2003-03-04 Thread Bryan Lipscy
Look up magic quotes in the docs.
http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc



The docs are mmm mmm good.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Maintain and ' in html textfields

2003-03-04 Thread Daniel Guerrier
I forgot to mention that I'm use add and stripslash on
the data so magin quotes wouldn't help.  The problem
is the  from the text is closing the  from the html.

--- Bryan Lipscy [EMAIL PROTECTED] wrote:
 Look up magic quotes in the docs.

http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc
 
 
 
 The docs are mmm mmm good.
 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Maintain and ' in html textfields - REPLY

2003-03-04 Thread Daniel Guerrier

I forgot to mention that I'm use add and stripslash
on
the data so magic quotes wouldn't help.  The problem
is the  from the text is closing the  from the
html.
 
 --- Bryan Lipscy [EMAIL PROTECTED] wrote:
  Look up magic quotes in the docs.
 

http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc
  
  
  
  The docs are mmm mmm good.
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Tax Center - forms, calculators, tips, more
 http://taxes.yahoo.com/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Maintain and ' in html textfields

2003-03-04 Thread Leif K-Brooks
www.php.net/htmlentities

Daniel Guerrier wrote:

If I have text containing quotes, single or double in
my database, and I try to set the text as a value for
my html text field.  The quote in the text will
prematurely close the value= or value='' html and
cut of the remainder of the text.  How can I prevent
this.
I curently have this:
input name=title type=text id=title size=100
maxlength=255  ? echo( value=\ .
stripslashes($row[0]) . \); ?
If I try to set the value to - bla bla something
I'll get bla bla
If I use value='' then the same happens for bla bla 'something'

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Maintain and ' in html textfields - REPLY

2003-03-04 Thread Bryan Lipscy


http://www.php.net/manual/en/function.preg-quote.php

preg_quote($var, '\'')
preg_quote($var, '')

Thank you for asking this question.  I learned something new.  This
looks like a good way to mitigate SQL Injection attacks as well.



-Original Message-
From: Daniel Guerrier [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 04, 2003 8:13 PM
To: 'php user group'
Subject: RE: [PHP] Maintain  and ' in html textfields - REPLY



I forgot to mention that I'm use add and stripslash
on
the data so magic quotes wouldn't help.  The problem
is the  from the text is closing the  from the
html.
 
 --- Bryan Lipscy [EMAIL PROTECTED] wrote:
  Look up magic quotes in the docs.
 

http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc
  
  
  
  The docs are mmm mmm good.
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Tax Center - forms, calculators, tips, more 
 http://taxes.yahoo.com/
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php