Re: Shift_JIS Character Set
| From: | Jason Wong | Date: | Fri, 12 Dec 2003 07:15:09 +0000 |
| Subject: | Re: Shift_JIS Character Set | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32014@lists.php.net to get a copy of this message | ||
On Friday 12 December 2003 14:47, Ng Hwee Hwee wrote:
> i'm doing a form (form.php)
> 1) user comes to form.php
> 2) user enters details and press submit
> 3) details get passed to form action verify.php
> 4) verify.php puts all the $_POST into an array $formVars
> 5) verify.php session_register("formVars")
> 6) if there is an error, verify.php sends user back to form.php
> 7) form.php echos all the $formVars (i.e. details that user has previously
> entered) in their respective textfields, together with the error messages
>
> i need to stripslashes at Step7 because as you have mentioned in a previous
> post on this list, magic_quotes_gpc added slashes to all my $_POST. Thus,
> since I need to echo them, I need to stripslashes.. I tried echoing the
> $formVars without the stripslashes and I see all the slashes before the
> quotes and backslashes etc.. so, by right, with English characters, i still
> need to stripslashes.
OK, if you *know* that the data has been through addslashes() (or equivalent
eg magic_quotes_gpc) then doing a strip_slashes() should revert the data to
its original form.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
The sheep that fly over your head are soon to land.
*/