How can I put data from a php file in html. Here is an example of the html file
<!DOCTYPE html> <html> <body> <div id="demo"></div> </body> </html> Php file example
<? include('db.php'); //Подключение к бд $Sql= "SELECT * FROM `table` WHERE `column1` = 1 $Sql= $PDOdb->prepare($Sql); $Sql->execute(); //Запрос while ($data= $Sql->fetch()) { print('<div>'); print($data['column2']); .... print('</div>'); } ?>
<iframe>- lampa