I got a textarea that has some html code in it. I want to send the content of this textarea without any change to next page via post method.
<html>
<form id="myform" name="myform" action="./getdata.php" method="post">
<td><textarea rows="7" cols="15" name="outputtext" style="width: 99%;"></textarea></td>
<input type="submit">
</form>
</html>
and my php code :
<?
$file_contents = $_POST['outputtext'];
?>
<textarea rows="30" cols="150"><?PHP print_r($file_contents); ?></textarea>
The problem with my code is that the orginal content of my first textarea gets changed when it sends to next page! For example:
<a href="/season/episodes.php?name=ok&id=1">
becomes:
<a href=\"/season/episodes.php?name=ok&id=1\">
could you guys how i can preserve the original html content without it changes in next page ?(Note all my html content changes in second pages which i dont want to change).My second textarea in second page is for testing purpose and i actually want to parse orginal value of $file_contents but for some reason it changes!
In your second PHP script, simply use strip_slashes to remove the extra slashes in the passed text: