What im trying to do is to present the text in the 'text' row of the table about in a textarea... (that was a strange sentence) and i should be able to add/remove/edit text in that textarea and then press save to update it...
When trying the about table gets wiped of all data...
<?php
if(isset($_POST['submit_about']))
{
mysql_query("UPDATE about SET `text` = '$row['text']'");
}
// get result from database
$result = mysql_query("SELECT * FROM about")
or die(mysql_error());
// present the result
while($row = mysql_fetch_array( $result )) {
echo "<form method='post' action='uc_admin.php'>
<textarea name='text' rows='8'>" . $row['text'] . "</textarea>
<br />
<button type='submit' name='submit_about' class='btn'>Save</button>";
}
?>