Code: Select all
<?php
include 'session.php';
include 'dbconnect_silent.php';
$username = $user;
?><center>
<table width=350 cellpadding=3 style="border-collapse: collapse; border: solid; border-width: 1; border-color: black;">
<tr><td background="images/pbody.png">
<div align="top"><b><u>DIG: reflect</u></b></td></tr><tr>
<td background="images/pbody_notop.png">
<?php
$sql = "SELECT * from dailyvibe WHERE userlink='$username' ORDER BY postid DESC";
$result = mysql_query($sql) or print ("Can't select entry from table php_blog.<br />" . $sql . "<br />" . mysql_error());
while($row = mysql_fetch_array($result)){
$date = stripslashes($row['timestamp']);
$title = stripslashes($row['title']);
$entry = stripslashes($row['entry']);
$postid = stripslashes($row['postid']);
?>
<b>
<?php
echo $date;
?> - <?php
echo $title;
?>
</b><br>
<textarea rows=7 cols=40>
<?php
echo $entry;
?>
</textarea>
<br><div align="right"><font size=1>
//this is where I want to have an edit button
</font></div><br>
<?php
}
?>
<?php
if (!mysql_num_rows($result)){
?>
You have not made any DIG posts yet.
<?php
}
?>would something like this work maybe?
Code: Select all
<a href="digedit.php?postnum=<?php
echo $postid;
?>
">edit</a>