Is validating $_GET id in database match secure enough?
I have 2 pages on the website, one is index.php and index page list all posts that exist in database, and other page is post.php and post page display single post when clicked on specific post on index page. Now the code that i used to list all posts on index.php is: $postslist = mysqli_query($db, "SELECT * FROM posts"); while ($post = mysqli_fetch_array($postlist)) { echo '<a href="' .SITEURL.'/post.php?p='.$post['postid'].'>'.$post['title'].'</a>'; } And this works and i have all posts displayed on my index.php page and links link to post on post.php page. And on post.php page i have used