curb
05-03-2006, 06:29 AM
Hi, I'm very new with php so it might be hard for me to explain what I'm trying to say and do. On the page "site.php", there's a textarea with a html code to google inside it. When someone submits that form, it'll send them to preview.php with the hardlink outside the textarea AND the source code to the hardlink inside the textarea.
The problem is that preview.php is giving out slashes:
<a href=\"http://www.google.com\">google</a>
Code:
site.php
<form action="preview.php" method="post">
<input type="hidden" name="action" value="preview">
<textarea class="hidden" name="preview">
<a href="http://www.google.com">google</a>
</textarea>
<input type="submit" name="view" value="Preview">
</form>
preview.php
<? echo ''.$_POST['preview'].'';?>
<br><br>
<textarea><? echo ''.$_POST['preview'].'';?></textarea>
I hope someone could help me out.
The problem is that preview.php is giving out slashes:
<a href=\"http://www.google.com\">google</a>
Code:
site.php
<form action="preview.php" method="post">
<input type="hidden" name="action" value="preview">
<textarea class="hidden" name="preview">
<a href="http://www.google.com">google</a>
</textarea>
<input type="submit" name="view" value="Preview">
</form>
preview.php
<? echo ''.$_POST['preview'].'';?>
<br><br>
<textarea><? echo ''.$_POST['preview'].'';?></textarea>
I hope someone could help me out.