I use native php5.6 to write blog
want to click on the column, appear under this column of the article, but how to appear all the articles.
sources of topics and their own ideas
mysqli took out all the columns but couldn"t use them.
related codes
/ / Please paste the code text below (do not replace the code with pictures)
<?php
error_reporting(E_ERROR);
ini_set("display_errors","Off");
$_mysqli = new mysqli("localhost","root","root","120blog");
$_mysqli->set_charset("utf8");
//
$sql = "select * from cat";
$rs = $_mysqli->query($sql);
$cats = array();
while ($b = mysqli_fetch_assoc($rs)){
$cats[] = $b;
}
//
$sql = "select * from art inner join cat on art.cat_id=cat.cat_id";
$rs = $_mysqli->query($sql);
$arts = array();
while($c = mysqli_fetch_assoc($rs)){
$arts[] = $c;
}
require("view/front/index.html");
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="./css/reset.css">
<link rel="stylesheet" href="./css/index.css">
</head>
<body>
<header>
<h1>Blog</h1>
<h4>,</h4>
</header>
<nav>
<ul>
<li><a href="">1</a></li>
<li><a href="">2</a></li>
<li>
<a href="">3</a></li>
<li><a href="">4</a></li>
</ul>
</nav>
<div id="main">
<div id="lside">
<?php foreach($arts as $a) {?>
<article>
<h2><a href=""><?php echo $a["title"];?></a></h2>
<div class="entry_header">
<time><?php date("Y-m-d",$a["pubtime"]);?></time>
by
<a href="-sharp"></a>
<a class="catlink" href="-sharp"><?php echo $a["catname"];?></a>
<a class="comment" href="-sharp"><?php echo $a["comm"];?></a>
</div>
<div class="entry_content">
<?php echo $a["content"];?>
</div>
</article>
<?php }?>
<div id="pagebar">
Pages:
<a href="-sharp">1</a>
<a href="-sharp">2</a>
<a href="-sharp">3</a>
4
<a href="-sharp">5</a>
<a href="-sharp">6</a>
</div>
</div>
<div id="rside">
<aside>
<form action="">
<input type="text" name="search" placeholder="Search...">
</form>
</aside>
<aside>
<h4></h4>
<ul>
<?php foreach($cats as $c) {?>
<li><a href="index.php?cat_id=<?php echo $c["cat_id"];?>"><?php echo $c["catname"];?></a></li>
<?php }?>![][2]
?>
how can all the articles appear in the click column? Do not understand, ask Daniel to solve