Re: Shift_JIS Character Set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
*/

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux