Mysql和php用/ html数据库问题

I want to get data from my sql database into a table with html.

I have writed 1st part of code ended with ?>

and started with html table and end with html

My code getting only Empty table without getting data from my Database, here the Code, i dont know how to get data with that

 <td> 
   <?php echo $result['nazwiskoimie'] ?>
 </td>

Here's the full code :

<?php
  $con=mysqli_connect("localhost","root","","listap");

  if (mysqli_connect_errno()) {
    echo "Blad przy polaczeniu z baza: " . mysqli_connect_error();
  }

  $result = mysqli_query($con,"SELECT * FROM 'lista'");                     
?>

<html> 

  <table border='1'>
    <tr>
    </tr>
    <tr>
      <td> <?php echo $result['nazwiskoimie'] ?> </td>
      //in this part have problem to get my data from database 
</html>

Here's also a screenshot of a result: Final After a Save my file

</div>
查看全部
duagfgfn1981
duagfgfn1981
2016/08/29 09:01
  • database
  • php
  • html
  • mysql
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复