อันนี้โค้ดมันครับ ไม่ได้เป็นแค่บรรทัดที่ 153 นะครับเป็นทุกบรรทัด
Warning: Trying to access array offset on value of type null in /home/www/virtual/bpp215.org/htdocs/page/sso_admin/keydata_news.php on line 153
<?php ob_start(); session_start();
if (!$_SESSION['user_coop']) {
header("Location: login.php?user=fail");
}else{
?>
<?php include('conn.php');
if (isset($_GET['news_id'])) {
}else{
$_GET['news_id'] ='';
}
$news_sql="SELECT
news.news_id,
news.news_name,
news.news_detail,
news.news_detail_short,
news.news_date,
news.user_id,
news.news_img1,
news.news_img2,
news.news_img3,
news.news_img4,
news.news_img5,
news.news_img6,
news.news_img7,
news.news_img8,
news.news_img9,
news.news_img10,
news.news_img11,
news.news_img12,
news.news_img13,
news.htmlopen,
news.`view`
FROM `news`
where news.news_id ='".$_GET['news_id']."'
";
$news_query = mysqli_query($conn,$news_sql);
$news = mysqli_fetch_array($news_query);
//echo $news_sql;
?>
บรรทัดที่ 153 <textarea class="form form-control" name="htmlopen"><?php echo $news['htmlopen']; ?>
ขึ้นแบบนี้ Warning: Trying to access array offset on value of type null in ใครมีความรู้ PHP ช่วยหน่อยครับ
Warning: Trying to access array offset on value of type null in /home/www/virtual/bpp215.org/htdocs/page/sso_admin/keydata_news.php on line 153
<?php ob_start(); session_start();
if (!$_SESSION['user_coop']) {
header("Location: login.php?user=fail");
}else{
?>
<?php include('conn.php');
if (isset($_GET['news_id'])) {
}else{
$_GET['news_id'] ='';
}
$news_sql="SELECT
news.news_id,
news.news_name,
news.news_detail,
news.news_detail_short,
news.news_date,
news.user_id,
news.news_img1,
news.news_img2,
news.news_img3,
news.news_img4,
news.news_img5,
news.news_img6,
news.news_img7,
news.news_img8,
news.news_img9,
news.news_img10,
news.news_img11,
news.news_img12,
news.news_img13,
news.htmlopen,
news.`view`
FROM `news`
where news.news_id ='".$_GET['news_id']."'
";
$news_query = mysqli_query($conn,$news_sql);
$news = mysqli_fetch_array($news_query);
//echo $news_sql;
?>
บรรทัดที่ 153 <textarea class="form form-control" name="htmlopen"><?php echo $news['htmlopen']; ?>