MySql result empty

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 ’















      <tr>
        <td>Email</td>
        <td>: '.$email.' Bytes</td>
      </tr>
      <tr>
        <td>Bio</td>
        <td>: '.$desk.'</td>
      </tr>
      <tr>
        <td>Tanggal lahir</td>
        <td>: '.$tgl.'</td>
      </tr>
      <tr>
        <td>No Hp</td>
        <td>: '.$hp.'</td>
      </tr>

      <tr>
        <td>Alamat</td>
        <td>: '.$alamat.'</td>
      </tr>
	  </tbody>
  </table>
  </div>';

}}}}

Thanks before

NIS : ‘.$nis.’
NISN : ‘.$nisn.’
nama : ‘.$nama.’

Is this just part of the code? Have you made the connection to the database? Also, make sure the table has content.

Sponsor our Newsletter | Privacy Policy | Terms of Service