Sunday, March 9, 2014

Tute 31 : Show publishing Date and time in article : Part Two

Open the index.php file in notepad++. Some edit the query line. We include `published time` after `category.` So our new line is :


------------------------------------------------------------------------------------------------------------------
$query= "SELECT `id`, `heading`, `image`, `details`, `category`, `published time` FROM tute ORDER BY id DESC ";
------------------------------------------------------------------------------------------------------------------
 


Then we include a line in while loop into the "body-con-l" div. We write this code after $id=$query_row['id']; line :

------------------------------------------------
$p_date=$query_row['published date'];
-----------------------------------------------
Then we write some code after <h3> line.

-------------------------------
echo $p_date. '<br>';
------------------------------


Now save the file and go to the Google chrome and refresh the home page. We show date and time after heading in every post.
Same work we will do in category page and details page.

No comments :

Post a Comment