And this is my input code which I want to use. I want the results (when the user has clicked modify from the previous page) to be displayed in the form (value="" etc.) and then to be able to edit the text, click submit and change the record in the table.
<?php
session_start();
if (!$_SESSION["valid_user"])
{
// User not logged in, redirect to login page
Header("Location: login.php");
}
include ("dbConfig.php");
if ($submit) {
$sql = "INSERT INTO posts (user_id,title,text) VALUES ('$user_id','$title','$text')";
$result = mysql_query($sql);
echo "Thank you! Information entered.\n";
} else{
?>
<form method="post" action="<?php echo $PHP_SELF?>">
<input type="hidden" name="user_id" value="<?php print $_SESSION["valid_id"]; ?>">
<br>
Title: <input type="Text" name="title"><br>
Text: <textarea rows="10" name="text" cols="40"></textarea><br><br>
<input type="Submit" name="submit" value="Go!">
</form>
<?php
} // end if
?><br><br>
<?php
virtual('menu.htm');
?>
</body>
</html>