I just make a script that show data from my sql table, but after I uploaded it, the result of this script is empty, whats wrong with this?, there’s no error
here’s the code :
$sql2=“SELECT NIS,email,deskripsi,foto FROM X4’”;
if ($result=mysqli_query($con,$sql2))
{
while ($row=mysqli_fetch_row($result))
{
$nis=$row[0];
$email=$row[1];
$desk =$row[2];
$foto =$row[3];
$sql3=“SELECT nama, Tanggal_Lahir, NISN, Alamat,hp FROM x4data WHERE nis=’”.$nis."’";
if ($result=mysqli_query($con,$sql3))
{
while ($data=mysqli_fetch_row($result))
{
$nama=$data[0];
$tgl=$data[1];
$nisn =$data[2];
$hp =$data[3];
$alamat =$data[4];
echo ’
NIS | : ‘.$nis.’ |
---|---|
NISN | : ‘.$nisn.’ |
nama | : ‘.$nama.’ |