Hi,
I've got a piece of code which should display the current data in text boxes to edit. At the moment the data is showing in the 'Title' text field but not the data in 'instructions' one.
Exactly the same code is used for both the title and instruction text boxes with the exception of instructions is a textarea, but this shouldn't cause a problem?
Please help if you can.
By the way I''ve checked and the field names are the same as in the database table.
<?php # Script 13.8 - edit_form_instructions.php
// Include the configuration file for error management and such.
require_once ('./includes/config.inc.php');
// Set the page title and include the HTML header.
$page_title = 'Edit Instructions';
include ('./includes/header.html');
?>
<h1>Edit Instructions</h1>
<?php
require_once ('../mysql_connect.php'); // Connect to the database.
$id = mysql_real_escape_string($_GET['id']);
$order = "SELECT * FROM uploaded_instructions
where instructions_id='$id'";
$result = mysql_query($order);
$row = mysql_fetch_array($result);
?>
<fieldset>
<form method="post" action="edit_data_instructions.php">
<input type="hidden" name="id" value="<?php echo $row['instructions_id'];?>">
<p>
<b>Title: </b> <input type="text" name="title"
size="100" value="<?php echo $row['title'];?>">
</p>
<p>
<b>Instructions: </b><br><textarea name="instructions" maxlength="1000" rows="30" cols="120" value="<?php echo $row['instructions'];?>" /></textarea> </p>
</fieldset>
<p>
<div align="center"><input type="submit" name="submit value" value="Edit"></div>
</p>
<?php // Include the HTML footer.
include ('./includes/footer.html');
?>