Here is the function code:
- Code: Select all
function update_content_form($id) {
$id = mysql_real_escape_string($id);
$res = mysql_query("SELECT * FROM posts WHERE id = '$id'") or die(mysql_error());
$row = mysql_fetch_assoc($res);
?>
<form method="post" action="index.php">
<div>
<input type="hidden" name="update" value="true" />
<input type="hidden" name="id" value="<?=$row['$id']?>" />
<div>
<label for="title">Title</label>
<input type="text" name="title" id="title" value="<?=$row['title'];?>" />
</div>
<div>
<label for="body">Body</label>
<textarea name="body" id="body" rows="8" cols="49"><?=$row['body']?></textarea>
</div>
<input name="submit" type="submit" value="Update Article" />
<?
}
Can anyone help me?



and sorry again