curb
07-15-2006, 01:04 AM
After I submit my form, the textarea generates a <br /> for every line break. It doesn't show up on localhost but it does on my host.
<form action="" method="post">
<div class="text"><strong>URL</strong></div>
<input name="link" type="text" />
<input type="submit" name="submit" value="Generate" class="bginput">
</form>
<textarea name="textarea" onClick="this.focus();this.select()">
<?php
$link = $_POST['link'];
if ($link == "") {
echo "Please fill out the form.";
} else {
echo "Submitted.
Your URL is ".$_POST['link']."";
}
?>
</textarea>
Any help would be appreciated :)
<form action="" method="post">
<div class="text"><strong>URL</strong></div>
<input name="link" type="text" />
<input type="submit" name="submit" value="Generate" class="bginput">
</form>
<textarea name="textarea" onClick="this.focus();this.select()">
<?php
$link = $_POST['link'];
if ($link == "") {
echo "Please fill out the form.";
} else {
echo "Submitted.
Your URL is ".$_POST['link']."";
}
?>
</textarea>
Any help would be appreciated :)