Guest User

Untitled

a guest
Jun 10th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. <?php
  2. $host="localhost";
  3. $user="root";
  4. $pass="root";
  5. $db_name="news";
  6. $link=mysql_connect($host,$user,$pass);
  7. mysql_select_db($db_name,$link);
  8.  
  9. $sql = mysql_query("SELECT `ID`, `Date`, `Top_news` FROM `New`", $link);
  10. while ($result = mysql_fetch_array($sql)) {
  11. echo $result['Date']." : ".$result['Top_news']. "<br>" ;
  12. ?>
Add Comment
Please, Sign In to add comment