Jump to content

content change dynamically on click


london77

Recommended Posts

Hi,

 

I have some files stored in mysql db.

 

I have created a web page which shows the list of tutorials from db.

 

at first i was creating a separate php page for each tutorial, but later i have decided that it would be easier and simpler if i can create one php page and whenever i click the tutorials it will change the content of this page.

example:

when i click "tut002" from list. it will change the content of tutorials.php .

I have these tutorials in .html format

 

here is the code i have in turorials.php

once again, whenever i click a tutorial this include part needs to change automatically to  whatever i click

echo '<div class="content">';
include ("inc/tut001.html");
echo '</div>';

 

it will be really appreciated if you have a sample code for this.

sorry for my english.

thank to whoever interested in this matter.

 

 

Link to comment
https://forums.phpfreaks.com/topic/221872-content-change-dynamically-on-click/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.