GetDotted Domains

Viewing Thread:
"Dodgey POST/form submit output (PHP)"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Sun 06/02/05 at 22:09
Regular
Posts: 10,364
Hmmmm.

Here's the deal.

When entering text into a textarea or textbox and submitting it then echoing it on another page, some of the characters don't seem to come out properly.

For example.

Apostrophies: It's
Come out as: It\'s

Any ideas as to why?
Mon 07/02/05 at 13:04
Moderator
"Are you sure?"
Posts: 5,000
Hopefully someone from FREEOLA reads this so they can change their system - whenever I use their Customer Service feedback form it is full of \'s !
Sun 06/02/05 at 22:51
Regular
"It goes so quickly"
Posts: 4,083
If you want to check if PHP is set to automatically escape any input, you can evaluate the return value of the get_magic_quotes_gpc() function:

if (get_magic_quotes_gpc()) {
# Automatic add slashes is on.
}
Sun 06/02/05 at 22:43
Regular
Posts: 10,364
Ah cheers, that did the trick!
Sun 06/02/05 at 22:39
Regular
"It goes so quickly"
Posts: 4,083
echo stripslashes($text);

By default, PHP allows for the addslashes function to automatically be run on any data being sent via POST (form), GET (query string) or from a COOKIE, which is what is happening on your web server (the magic_quotes_gpc value in the php.ini file is set to on).

The stripslashes function, as I'm sure you can already guess, strips out these slashes.
Sun 06/02/05 at 22:33
Regular
"Devil in disguise"
Posts: 3,151
You've got magic quotes turned on, look at this..

[URL]http://uk.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc[/URL]
Sun 06/02/05 at 22:09
Regular
Posts: 10,364
Hmmmm.

Here's the deal.

When entering text into a textarea or textbox and submitting it then echoing it on another page, some of the characters don't seem to come out properly.

For example.

Apostrophies: It's
Come out as: It\'s

Any ideas as to why?

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

The coolest ISP ever!
In my opinion, the ISP is the best I have ever used. They guarantee 'first time connection - everytime', which they have never let me down on.
Continue this excellent work...
Brilliant! As usual the careful and intuitive production that Freeola puts into everything it sets out to do, I am delighted.

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.