Hi, I have a portion of text on my page that is stored in a MySQL database in the table picture_note. The code below is from my admin section, where i want to be able to type new text in my textarea that replace it with the current text in the table. It currently with my script just adds to it, its not deleting. Someone recommonded the UPDATE command but im lost, could someone please help me?
<?php
if(isset($_POST['action'])){$action=$_POST['action'];}else{$action="";}
if(isset($_POST['message'])){$message=$_POST['message'];}else{$message="";}
if($action=="post")
{
$mysql_access=mysql_connect("xxx", "xxx", "xxx");
mysql_select_db("pictures");
$mysql = 'DELETE FROM `picture_note` ';
$mysql="insert into picture_note values('$message')";
mysql_query($mysql, $mysql_access);
}
?>