i just realised that sorry
Form code
<?php
//import the database connection file
include("connect.php");
// Send the preloaded content to the function.
$request ='faqs';
$query = mysql_query( "SELECT * FROM contents WHERE page = '".$request."'");
//fetch the results of the $query and store them in $row
$row = mysql_fetch_array($query);
?>
<form name="update" action="updatefaq.php" method="post">
<p> </p>
<textarea name="elm1"><?php echo $row['content'];?></textarea>
</script>
<input name="submit" type="submit" value="Submit" />
</form>
The update code with sql error checking (unsure if its in the right place)
//import the database connection file
include("connect.php");
//The UPDATE query used ... this is used to CHANGE an existing record to the users table
$request ='faqs';
$sql= mysql_query("UPDATE contents SET content = '".$_POST['elm1']."' WHERE page =
'$request'");
if (!$sql)
{
die(mysql_error());
}
echo "Thank you! Information updated.";
mysql_close($dbconnection);
?>
with the error checking in the second part it comes up with
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'nonexistentdb' 1146: Table 'kossu.nonexistenttable' doesn't exist Se' at line 1
without the error checking it displays no error and continues to success page