Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

urlencode() not working on "enter" button 1

Status
Not open for further replies.

saroy71

Programmer
May 16, 2002
22
CA
Hi php wizards,

I'm having problems with getting a variable to pass correctly from page1.php to page2.php.

On page1.php there is a form where a person puts in name, email, and a brief message. It is this message where I am running into problems.

On page2.php I want to see the message 'exactly' as written. That is, if the person presses the 'enter' button then I want a carrage return. What I am currently getting is one long line of what was written. A single space comes out fine (doesn't show up as a +) but not the carrage return.

I've tried urlencode and rawurlencode with no success.
$message = unlencode($_GET['message']);

Any thoughts?

Education is what you get from reading the small print.
Experience is what you get from not reading it.
 
Wow... that was easy.

Thanks so much Spookie.

As new to php I don't know it very well.

I don't suppose there is something equally as easy so that it will display the single quote (') or double quote (") correctly? Currently it is putting a backslash in front of them.

Please let me know.

Education is what you get from reading the small print.
Experience is what you get from not reading it.
 
found it.

"stripslashes()"

I love php. ;)

Education is what you get from reading the small print.
Experience is what you get from not reading it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top