Re: encode $searchenquiry

From: Date: Wed, 07 Jul 2004 18:09:43 +0000
Subject: Re: encode $searchenquiry
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-189893@lists.php.net to get a copy of this message
"John Taylor-Johnston" <taylorjo@CollegeSherbrooke.qc.ca> wrote in message news:40EC39BD.510A367E@CollegeSherbrooke.qc.ca... > I have created an .inc that allows me to click on a submit to show the next or previous 25 records found etc. The problem is that if $searchenquiry includes a quotation mark, the html looks like: > > <input type="hidden" name="searchenquiry" > value=""atwood's" -margaret\"> > > Is there a function to encode $searchenquiry to do this? > > <input type="hidden" name="searchenquiry" value="&quot;atwood's&quot; -margaret\"> > > Or should I URLencode $searchenquiry or ... how should I approach this? > > <input type=\"hidden\" name=\"searchenquiry\" value=\"".$searchenquiry."\"> > > John Hi John, you are looking for htmlentities(): http://de3.php.net/htmlentities Regards, Torsten Roehr

« previous php.general (#189893) next »