I have to pass a string to a form. I want to use a mix of $_GET and $_POST in the following way:
<?php $string="bla bla bla".$some_other_string."bla bla".$some_other_string2."
"; ?>
<form action="this_page.php?string=<?php echo $string?>" method="post" name="name">
</form>
Please note the
in the string.
When I get the $_GET("string")
(or $_REQUEST("string"
), it happens the following: the php parser get the
as a string. So he put it into the string as I had coded: \\
and it's not the result I want. I want simply a inner
in a php string.
Please can you explain me why this behaviour happens, without complaining that it's not the best way to pass a string (I suppose it isn't, but today I had an issue and I wanted to manage it by passing the string this way)?
Ps: I have to use the
and not the html <br />
because I have to let php write into a file.