here is the main part of the code.
// select query to see if record exist
$sql2 = ("SELECT FROM cours WHERE cours_num ='$cours_num'");
$result = @($sql2);
$row = @mysql_fetch_array($result);
mysql_close();
?>
<h1 class="center">Edit/Add Record</h1>
<form id="cours.php" method="post" action="course_complete.php" >
<p>Course Number:<br />
<input type="text" readonly="boolean" name="cours_num" size="10" value=<?php echo $cours_num?>><br/>
</p>
<p>Course Title:<br />
<input type="text" name="cours_title" size="10" value=<?php echo $row['cours_title']?>><br/>
</p>
<p>Course Description:<br />
<input type="text" name="cours_desc" size="50" value=<?php echo $row['cours_desc'] ?>><br/>
</p>
<p >
<input type="submit" value="Add/Edit Records"name="submits" alt="Add/Edit Records" />
</form>
</body>
</html>
what I mean by being trimmed is that if for example that the input to cours_title is bus 456 when retrieved only bus is showing in the input box