Location: PHPKode > projects > PHP Enter > www/admin/editnews.php
<?php include('header.php'); include('options.php'); ?>
<table width="97%" text align="center" border="0">
<tr><td align="left" width="320"><center><h3>Listing Detail</h3></center><br>
<?php
$id = $_GET['id'];
$resulta = mysql_query("SELECT * FROM newser WHERE blogid ='$id'") 
or die(mysql_error()); 
while($link=mysql_fetch_array($resulta)){
if(isset($_POST['submit']))
{
$btextyx = $_POST['btextyx'];
$btextyx = addslashes ($btextyx);
$bamessy = $_POST['bamessy'];
$bamessy = addslashes ($bamessy);
mysql_query("UPDATE newser SET  btexty = '$btextyx', bamess = '$bamessy' WHERE  `blogid` = '$id' ") 
or die(mysql_error());
echo 'Successfully!';
}else{
?>
<br />
<form method="post" action="editnews.php?id=<?php echo $link['blogid'] ?>">
Title:<br> <input name="btextyx" value = "<?php echo $link['btexty']; ?>" size="40" maxlength="255">
<br /><br />
Description:<br /><textarea name="bamessy"><?php echo $link['bamess']; ?></textarea>
<br /><br />
<input type="submit" name="submit" value="Edit News">
</form>
<?php } } ?>
Return current item: PHP Enter