简体   繁体   中英

Not printing the body of blog post?

In my code, it should print the body of "Testing... Test Link", though it does not. You can view the errors here: http://pirates-online-rewritten.com/blog.php?ID=1 This is my code:

<?php
include "header.php";
include "connect.php";
$ID = mysql_real_escape_string(strip_tags(stripslashes($_GET['ID'])));
$getPost = mysql_query("SELECT * FROM Blogs WHERE ID='$ID'");
$gP = mysql_fetch_object($getPost);

echo $gp->Body;

include "footer.php";
?>
Notice: Undefined variable: gp in /home/induadmi/public_html/por/blog.php on line 8

$gp doesn't exist. However $gP exists. Could they actually be the same ? :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM