I have this code and it gives me the following error:
Notice: Undefined index: ID in
<?
require('../members/inc/config.php');
require('../lib/framework.php');
// load the configuration file.
$newsid = $_GET['ID'];
$stmt = $db->query("SELECT * FROM news ORDER BY id = '$newsid' ");
while($myrow = $stmt->fetch(PDO::FETCH_ASSOC)) {
//now print the results:
echo "<b>Title: ";
echo $myrow['Title'];
echo "</b><br>On: <i>";
echo $myrow['Date'];
echo $myrow['Embed'];
echo "</i><hr align=left width=160>";
echo $myrow['Hour'];
// Now print the options to (Read,Edit & Delete the news)
echo "<br><a href=\"testonho.php?newsid=$myrow[ID]\">Read More...</a>
|| <a href=\"edit_news.php?newsid=$myrow[ID]\">Edit</a>
|| <a href=\"delete_news.php?newsid=$myrow[ID]\">Delete</a><br><hr>";
}//end of loop
?>
I've had other issues related to this error here in StackOverflow and I did not really find what I wanted. I would like a resolution help for this problem: s