Question
how to make this warning disappear. i havent click the read full post in my index.php it is already showing. Warning : Undefined array key
how to make this warning disappear. i havent click the read full post in my index.php it is already showing.
Warning: Undefined array key "id" in C:\xampp\htdocs\wd2\A3 Starting Files(1) ead-post.php on line 7 Warning: Trying to access array offset on value of type bool in C:\xampp\htdocs\wd2\A3 Starting Files(1) ead-post.php on line 17 Warning: Trying to access array offset on value of type bool in C:\xampp\htdocs\wd2\A3 Starting Files(1) ead-post.php on line 18
what i need is this sample after i click the read full post.
this is my coding please help to fix.
//retrieve id from URL
$id = $_GET['id'];
//query to select full post content based on id $query = "SELECT title, content FROM blogs WHERE id = :id"; $statement = $db->prepare($query); $statement->bindValue(':id', $id); $statement->execute(); $blogs = $statement->fetch();
//display full post content echo '
' . $blogs['title'] . '
'; echo '' . $blogs['content'] . '
';?>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla non nibh. Duis aliquet leo et ante. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Read Full Post. My Amazing Blog Ghost on Campus edit November 14,2009 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla non nibh. Duis aliquet leo et ante. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin iaculis mollis ipsum. Maecenas at purus. Ut pellentesque rhoncus neque. Etiam scelerisque enim et eros. Pellentesque in velit sit amet justo semper placerat. Phasellus enim massa, interdum at, dictum a, dictum eget, arcu. Proin ut tortor. Sed condimentum euismod ligula. Nulla facilisis augue et mauris. Proin sodales elit sed eros. Nunc sed libero sed ligula laoreet sodales. Proin egestas. Duis fringilla facilisis est. Morbi urna ante, varius ut, aliquam interdum, lacinia at, purus. Duis porta tincidunt ante. Fusce pulvinar, nisl non varius luctus, lorem ligula convallis metus, eu luctus odio augue at leo. Donec accumsan, libero sit amet imperdiet commodo, purus sapien tincidunt sem, eu interdum dui quam sed urna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent consequat loremStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started