Fluidbyte
Fluidbyte

Reputation: 5210

PHP $_POST Removing Backslash

I'm submitting though a form with content like this:

This is a test \ or something

Which ends up coming through POST as

This is a test  or something

Notice the missing backslash. I really need the contents with the backslash maintained. Any help would be awesome.

EDIT:

Basically I'm just writing this out to a file:

<?php

frwite($file, $_POST['content']);

?>

I'm not running stripslashes() against it or any other transformations

It works fine on a server with magic_quotes_gpc enabled, but this application may float between servers that support and some that don't.

Basically I'm looking for a way to make this work regardless of magic_quotes_gpc

Upvotes: 0

Views: 1019

Answers (1)

rationalboss
rationalboss

Reputation: 5389

Somewhere in your code you might be calling stripslashes(). Check that your code doesn't have this function and any other libraries you may have included.

Upvotes: 2

Related Questions