Welcome Guest, Not a member yet? Register   Sign In
decoding encodeURIComponent()
#1

I am using encodeURIComponent() in my javascript program before I send over an email address to the server.

the email is arriving at the CI program as this and I tried using entity_decode 
$email_key = entity_decode($json2->email,"@");

When the email arrives at the CI controller it is now "bandfrombossanova%40gmail.com.
But my attempt to decode it in CI is causing an issue. Is entity_decode the proper way to get back the email ([email protected])?  
proof that an old dog can learn new tricks
Reply
#2

(This post was last modified: 10-07-2018, 02:21 AM by jreklund.)

http://php.net/manual/en/function.urldecode.php
http://www.php.net/manual/en/function.rawurldecode.php
Reply
#3

@richb201,

You could also decode in the Javascript too (https://www.w3schools.com/jsref/jsref_de...ponent.asp ).
Reply




Theme © iAndrew 2016 - Forum software by © MyBB