*******************************************************************************************************<?php
include_once("functions/file_system.php");
$news_id = $_GET["news_id"];
get_connection();
$result_news=mysql_query("select * from news where news_id=$news_id");
$result_category=mysql_query("select * from category");
close_connection();
$news=mysql_fetch_arrary($result_news);?>
<form action="news_update.php" method="post">
标题:<input type="text" size="60" name="title" value="<?php echo $news['title']?>"><br>
内容:<textarea cols"60" rows="16" name"content"><?php echo $news['content']?></textarea><br>
类别:
<select name="category_id" size="1" >
<?php
while($category=mysql_fetch_array($result_category)){
?>
<option value="<?php echo $category['category_id'];?>" <?php echo ($news['category_id']==$category['category_id'])?"selected":""?>><?php echo $category['name'];?></option>
<?php
}
?>
</select>
<br>
<input type="hidden" name="news_id" value="<?php echo $news_id?>">
<input type="submit" value="修改">
</form>
**************************************************************************************************************
执行出现下面错误;急求解决!
Notice: Undefined index: news_id in C:\wamp\www\news\news_edit.php on line 3Fatal error: Call to undefined function get_connection() in C:\wamp\www\news\news_edit.php on line 4
include_once("functions/file_system.php");
$news_id = $_GET["news_id"];
get_connection();
$result_news=mysql_query("select * from news where news_id=$news_id");
$result_category=mysql_query("select * from category");
close_connection();
$news=mysql_fetch_arrary($result_news);?>
<form action="news_update.php" method="post">
标题:<input type="text" size="60" name="title" value="<?php echo $news['title']?>"><br>
内容:<textarea cols"60" rows="16" name"content"><?php echo $news['content']?></textarea><br>
类别:
<select name="category_id" size="1" >
<?php
while($category=mysql_fetch_array($result_category)){
?>
<option value="<?php echo $category['category_id'];?>" <?php echo ($news['category_id']==$category['category_id'])?"selected":""?>><?php echo $category['name'];?></option>
<?php
}
?>
</select>
<br>
<input type="hidden" name="news_id" value="<?php echo $news_id?>">
<input type="submit" value="修改">
</form>
**************************************************************************************************************
执行出现下面错误;急求解决!
Notice: Undefined index: news_id in C:\wamp\www\news\news_edit.php on line 3Fatal error: Call to undefined function get_connection() in C:\wamp\www\news\news_edit.php on line 4
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货