Hi!!
Hope someone can help me with this.. it's becoming rather frustrating!! I have a form which includes a <textarea> ... at the moment when staff at the station are inserting data.. they need to put <br> between lines etc.. I don't want to go down the route of having to use a WYSIWYG editor, they are quite expensive!!!
Here is the form insert page...
<? include "passwordsession.php" ?>
<? include "pageheader.php" ?>
<fieldset class="fieldset"><legend><span class="Header">Add New Artist:</span></legend>
<div class="div">
<div align="right">
<form action="insertartist.php" method="post">
Your Name:
<input name="newsname" type="text" size="30" maxlength="50" />
<br />
Artist Name:
<input name="newsby" type="text" size="30" maxlength="100" />
<br />
Artist Image URL:
<input name="newsimage" type="text" size="30" maxlength="100" />
<br />
Artist Official Website:
<input name="newsurl" type="text" size="30" maxlength="100" />
<br />
Artist Biog:
<textarea name="newsbody" type="text" wrap="physical" cols="50" rows="10" /></textarea>
<br />
<label>
<input type="submit" value="Add Artist" /><br />
</form>
</div>
</div>
</fieldset>
<? include "pagefooter.php" ?>
& The insertartist.php processing page
<? include "pageheader.php" ?>
<?
$username="USERNAME";
$password="PASSWORD";
$database="DATABASE";
$host="DATABASEHOST";
$newsname=$_POST['newsname'];
$newsby=$_POST['newsby'];
$newsurl=$_POST['newsurl'];
$newsimage=$_POST['newsimage'];
$newsbody=$_POST['newsbody'];
mysql_connect($host,$username,$password);
mysql_select_db($database);
$query = "INSERT INTO book1 VALUES ('$newsid','$newsname','$newsby','$newsbody','$newsurl','$newsimage')";
mysql_query($query);
mysql_close();
?>
<fieldset class="fieldset"><legend><span class="Header">Add Artist:</span></legend>
<div class="div">
<div align="center">
Hi <?php print "$newsname"; ?> Your Artist Was Added Successfully!<br />
<br />
<table width="102" height="102" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center"></td>
</tr>
</table>
<br />
<a href="addartist.php">Add another Artist?</a> </div>
</div>
</fieldset>
<? include "pagefooter.php" ?>
Does anyone know 🙂? Hope you can help