diff --git a/admin/login.php b/admin/login.php index efaa439..2e8935d 100644 --- a/admin/login.php +++ b/admin/login.php @@ -41,4 +41,4 @@ if ($sttype!=2) { setcookie("adminlogin", json_encode($arr), time()+86400); header("Location: index.php"); } -?> \ No newline at end of file +?> diff --git a/index.php b/index.php index 0eeb95f..c32be9e 100644 --- a/index.php +++ b/index.php @@ -45,6 +45,7 @@ include 'checklogin.php'; $qry="SELECT * FROM `$mysql_table` ORDER BY `$mysql_table`.`id` DESC LIMIT 0, 30 "; $result=mysqli_query($qry); $iffirst=0; + $newlastid="null"; while ($row = mysqli_fetch_array($result)) { $postlinked = stripslashes($row["txt"]); echo '
'.$postlinked.'
'.$row["tim"].'
'; diff --git a/initialize-tables.md b/initialize-tables.md new file mode 100644 index 0000000..6b9825a --- /dev/null +++ b/initialize-tables.md @@ -0,0 +1,10 @@ + +Log in to your MySQL server, then run the following: + +``` +CREATE TABLE microblog ( +id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, +txt VARCHAR(240) NOT NULL, +tim VARCHAR(20) NOT NULL +) +```