Every question which I asked on stackoverflow I received a question that It was easy to do a php injection into my script.
I've now a example and checked some tutorials on youtube. Am I doing this right now? This is an example how I'm working now
if($user->isLoggedIn()) {
$pakuser = $user->data()->username;
$sql = $db->query("SELECT * FROM users
INNER JOIN post ON users.username = post.add
WHERE post.id = $id AND post.add = '$pakuser'")
or die(mysql_error());
if ($sql === FALSE) {
}
if($row = $sql->fetch_object())
if($row->add)
{
?>
<p><a href="editpost.php?id=<?php echo htmlspecialchars($gooo->id);?>">edit this post</a><br><br>BEWARE OF DELETING YOUR CONTENT THERE IS NO GO-BACK<BR><a href="delete.php?id=<?php echo htmlspecialchars($gooo->id); ?>">Delete this post</a> </p>
<?php
}
}