Results 1 to 2 of 2

Thread: Dynamic html file name with mysql?

  1. #1
    Join Date
    Oct 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Dynamic html file name with mysql?

    Hey,

    Well i want to use html which contains php / mysql intergrated data, which ive already done but all i need to do now is
    to find a script that will add the news title from the mysql database, (e.g. GTA 4 Delay) and it would appear as:

    http://www.example.com/article/gta-4-delay.html?id=1

    The ID will extract the data from the database, and display it on the html template that will be used for all news articles.
    and the file name is there to replace the boring file name "view_article.html".

    Any help will be very much appreciated, even if you can't help me then point me into the right direction how to do this.
    Last edited by mucky1215; 10-07-2007 at 02:27 PM.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The request comes before the server interaction, and you can't have pages that don't exist on the server return anything.
    The best you can do is use get variable sot fake that, like:
    example.com/article?a=gta-4-delay.html&id=1

    You could try some very complex redirecting and mod-rewrite/.htaccess to try the original idea, but it would be quite difficult and might not work in the end.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •