On Fri, Feb 10, 2012 at 3:30 PM, John Halladay <[email protected]> wrote: > I'd suggest the following to get the values in and out. > > $goes_in = urlencode(base64_encode(serialize($_POST))); > $comes_out = unserialize(base64_decode(urldecode($goes_in)));
urlencode() is for, well, URLs, not HTML form values, and base64 encoding the string doesn't make a difference at all since you're just using in place of the appropriate solution of using htmlspecialchars(). I can't believe how many times I see PHP developers using base64 encoding for string values when the whole reason it exists is to transfer *binary* data in an ASCII format. Yes, it works, but it works for all the wrong reasons. Regards, Bryan Petty _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
