Hi
I am trying to populate a text area based on a value submitted through a drop down box. Below is the code i have written to populate that text area. But i cannot seem to get it to work. All it shows is blank.
<?php
if (!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Email'])) {
?>
<p><form method="post" action="">
<fieldset>
<table width="558" border="0" cellpadding="5">
<tr>
<td><label for="recipe">Recipe:</label></td>
<td><SELECT NAME="recipeid"><OPTION VALUE=0>Select Recipe<?php echo $item; ?></SELECT>
</td>
</tr>
</table>
<input type="submit" id="login-submit" value="Register" />
</fieldset>
</form></p>
<?php
if(!empty($_POST['recipeid'])){
$recipeid = mysql_real_escape_string($_POST['recipeid']);
$description = mysql_query("SELECT decription FROM recipes WHERE recipeid = '" . $recipeid . "'");
echo'<textarea rows="10" cols="75">';
echo $description;
echo '</textarea>';}?>
<?php
}
else {
?>
<p> Please login to view this content</p>
<?php
}
?>