Hi Guys,
i have a problem with this mysql update, it says its working but it's not then id auto increments fine but the "biography" row is blank:
i know the where clause is wrong but i wasn't sure what to put there i onlu have 2 rows in mysqlPHP Code:<?php
// Includes... /////////////////////////////////////////////////////////////////////
include("db_connection.php");
// Include the navigation bar...////////////////////////////////////////////////////
include("navbar.php");
// Edit/delete the bio page...//////////////////////////////////////////////////////
if(isset($_POST['submit'])) {
$query = "UPDATE biography SET biography='$biography' WHERE biography='8'";
$result = mysql_query($query);
// Error checking...////////////////////////////////////////////////////////////////
if($result) {
echo "IT WORKED";
} else {
echo "IT DIDN'T WORK";
}
} else {
echo "<center>";
echo "<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
<form action=\"biography_edit.php\" method=\"POST\">
<tr>
<td align=\"center\"bgcolor=\"#E2E2E2\" /><p>Update Biography</td>
</tr>
<tr>
<td align=\"center\"bgcolor=\"#E2E2E2\" /><textarea rows=\"20\" cols=\"60\" name=\"biography\"></textarea></td>
</tr>
<tr>
<td align=\"center\"bgcolor=\"#E2E2E2\" /><input type=\"submit\" name=\"submit\" value=\"Update\"></td>
</tr>
</table></form>";
}
?>
id
biography
thanks for nay help
Graham





Bookmarks