CoderZone.org
Pages: 1 « previous     next »
  Print  
Author Topic: Plus signs converted to spaces  (Read 4068 times) Bookmark and Share
Cruise Elroy
Newbie
*
Posts: 14



View Profile
« on: Jan 26, 2011, 09:23:13 am »

This gave me fits for a while: when sending data from a form in php, plus signs (+) are automatically converted on the receiving end to spaces when using urldecode().

I couldn't figure out why that was happening, but it turns out that php does that as a default action.

I was trying to send the email address "jan+meyers@gmail.com" and it was showing up as "jan meyers@gmail.com".  From the php docs:

"Plus symbols ('+') are decoded to a space character."

I'd prefer they weren't, frankly.
Logged
cuberat
Newbie
*
Posts: 40


View Profile
« Reply #1 on: Jan 26, 2011, 02:36:08 pm »

check the enctype attribute on the form tag http://www.w3schools.com/TAGS/att_form_enctype.asp

Logged
Tags:
Pages: 1
  Print  
 
Jump to: