Closed templeman closed 10 years ago
Hi Templateman,
Try email[plus]1@gmail.com
or do
$ajax->encode('email+1@gmail.com');
-Cj
Thanks Ajaxboy. Here is the code I used to get it working:
$_POST['email'] = $ajax->encode($_POST['email']);
$_POST['email'] = rawurldecode($_POST['email']);
Using $ajax->encode()
does bring back the missing "+" sign. However, it also encodes the special characters, so it ends up returning email+1%40gmail.com
. Running the result through rawurldecode() closes the loop and brings it back to the original value, i.e. email+1@gmail.com
.
When submitting a form with CJAX, form values containing the plus sign symbol are reaching the handler script with spaces in place of plus signs. So submitting
email+1@gmail.com
comes through asemail 1@gmail.com
.Is there a way to preserve "+" symbols across the CJAX encoding process?