Friday, January 31, 2014

Tute 15 : Make a Dynamic Details Page Using php Code

Last tutorial we create dynamic “details page” page. But one problem is here. This page show only an article. Now we will make it dynamic. Before we some edit our index.php page. So go to this page. And change some code into the <body>’s <?php ?> code.

Into the php code we see a line : $image=$query_row['image']; We inter some code after this line. This code is here :

------------------------------------

$id=$query_row['id'];

------------------------------------

Then edit the heading line. We delate echo '<h3>'.$heading. '</h3>'; code and write some new code. New code here :

-----------------------------------------------------------------------------------------

echo '<h3><a href="detailspage.php?id='.$id.'">'.$heading. '</a></h3>';

-----------------------------------------------------------------------------------------

After that refresh the home page in chrome. Go to our mouse in headline. We see the mouse pointer is changed and headline is linkable.

No comments :

Post a Comment