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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.