$sql = "DELETE FROM posts WHERE number=$post_number";
mysqli_set_charset($conn, "utf8"); // yaftane topici ke bodim
$sql = "SELECT * FROM posts WHERE number=$post_number";
$result = mysqli_query($conn ,$sql );
while($info = mysqli_fetch_array( $result ))
{
$topic_number=$info['topic'];
}//while
$str="delete";
if ( $_SESSION["username"] == $user )
echo'<a href="delete_post.php?number='.$post_number.'">'.$str.'</a>';
if ( $_SESSION["username"] == $user ) //aya khode saheb posteh
{// Auth
if( ! isset($_POST['act']))
{
....
.....
.....
......