PHP קוד:
<?php
include "config.php";
$query = mysql_query("SELECT * FROM `msg`");
while($con = @mysql_fetch_array($query))
{
$msg = $con['Update'];
}
?>
<html>
<head>
<form method="POST">
<div align="center">
<textarea name="messege"><?php echo $msg; ?></textarea>
<input type="submit" value="עדכן תיבה">
</form>
</html>
<?
$id = $_GET['id'];
$update = $_POST['messege'];
$updateSQL = "UPDATE `msg` SET `Update` = '$update' WHERE `id`='$id'";
mysql_query($updateSQL) or die(mysql_error());
?>