Last active
October 12, 2015 20:46
Revisions
-
nikartx revised this gist
Oct 12, 2015 . 1 changed file with 1 addition and 27 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,33 +7,7 @@ <body> <div> <p>Спасибо за обращение! Ваше сообщение отправлено.</p> </div> </body> -
nikartx created this gist
Jul 13, 2015 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ <!doctype html> <html> <head> <meta charset="utf8"> <title> Site news </title> </head> <body> <?php $connection = mysql_connect("127.0.0.1", "root", ""); $db = mysql_select_db("DataBaseName"); // mysql_set_charset("utf8"); if(!$connection || !$db) { echo "Error! No connection with DB."; exit(mysql_error()); } $result = mysql_query("SELECT * FROM news"); mysql_close(); while ( $mass = mysql_fetch_assoc($result) ) {?> <h1> <?php echo $mass['title']; ?> </h1> <img src="<?php echo $mass['img']; ?>" /> <p> <?php echo $mass['description']; ?> </p> <p> Date: <?php echo $mass['date']; ?> </p> <hr/> <?php }?> </body> </html>