简体   繁体   中英

Getting Notice: Undefined Index: id

I'm making a forum software right now, just for some practice, and I'm getting this error when displaying the forums of the site.

This is my current start to it. It works, it just gives me this error:

Notice: Undefined index: id in C:\\xampp\\htdocs\\forum\\forums.php on line 15

<?php
include_once("connect.php");
mysql_select_db("forums");

$find = "SELECT ID,name,description FROM forums";  
$run_find = mysql_query("$find");
while($is = mysql_fetch_assoc ($run_find)) 
{
$id = $is['id'];
$name = $is['name'];
$des = $is['description'];

print "Forum : <a href='topics.php?t=$id'>". $name . "</a><br/>" .$des . "";
}

?>

我认为你应该改变你的关键:

$id = $is['ID'];

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