I have a simple insert query on my social network that allows the user to enter text in a text area and have it output on their profile page. They have the option to delete and it marks the status as dead,as intended, and erases the update. The problem is, if they just type in a new one, without deleting what is already there (which I want them to be able to do) Technically they have not deleted the previous submission, and it reloads the page with their old post.
I want to keep it to where they have the option to delete and it marks it dead in db (as it is now) but when they write a new one,without deleting, it automatically marks the previous submission as dead.
I have this on my delete script:
$query = "UPDATE `UserUpdates` SET `status` = 'dead' WHERE `id` = '".$UserUpdates."'";
$request = mysql_query($query,$connection);
I am a newbie,but understand the logic of what I need to do, just am not sure of the required syntax/function