I've been looking through the site and going over pointers on similar problems but none have seemed to work for me. I'm a wee bit stuck, hoping someone can point out my stupidity.
I created a basic form to test as my main site was giving me problems. There is no error checking or filtering for malicious code, it's just a test to figure out why it won't work. I can't retrieve any data from a textarea. All other types work, text, number, etc... all fine.
Here is my basic form, can anyone see the error of my ways?
<?php
require_once('header.php');
if(isset($_POST['submit']))
{
echo "<br>single line comment: " .$_POST['singlelinecomment'];
if (!isset($_POST['comments']))
{
echo "<br>nothing in textarea data, move along, move along";
}
else
{
$comments = $_POST['comments'];
echo "<br>comments: ". $comments;
}
}
?>
<form name="conversation-form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<table>
<tr>
<td>
<input type='text' name="singlelinecomment">
</td>
</tr>
<tr>
<td>
<textarea rows="20" cols="50" form="conversation-form" name="comments"></textarea>
</td>
</tr>
<tr>
<td>
<input type="submit" name="submit" value="Submit" /><br>
</td>
</tr>
</table>
</form>