Menu

dynamically generated php pages

2001-04-13
2001-04-16
  • Nobody/Anonymous

    Is it possible to index dynamically generated pages? We have an application which presents students with a series of questions. The questions, the answers, explanations, and feedback are stored in a database. A script generates a page based on quiz_id, question number and other inputs (e.g., quetion.php?quiz_id=$quiz_id&question_number=$question_number). I am trying to determine if the page indexing script can be edited to allow page names to be indexed with variables so that when a student looks at question 1, for example, she will be able to add/view comments related only to question 1, etc. Is this possible with the current version or planned for a subsequent version?

    This is a very nice tool, extremely intelligibly designed so that it is easy to install, configure, and use. Thanks very much.

    Best regards,

    Kathie Ferraro
    University of Pittsburgh School of Medicine
    kaf1@pitt.edu

     
    • Kenzaburo Ito

      Kenzaburo Ito - 2001-04-13

      Kathie,  Hi and thanks for the compliment!

      Actually yes, the server variable REQUEST_URI would contain the exact parameters in the URL field.

      The problem comes in figuring out a good way to index these files.  You could, of course, manually input these through some form, but that's pretty time consuming.

      A better way would be for the page to have a "index this page" option (available only to admins) and use the REQUEST_URI to index.  So the admins would click their way through the quiz and hit the "index this page" as they go along.

      You'd also have to use the REQUEST_URI to retrieve data instead of the __FILE__.  It's a moderate amount of work but it's doable.

       
      • Nobody/Anonymous

        OK, thanks. I indexed the pages manually since there were only 20.

        I changed __FILE__ to $REQUEST_URI in the following places
            note_add.php
            note_add_page.php
            question.php [my question sript]

        but the url for Add Note link is
        http://blair.omed.pitt.edu/phpWebNotes-1.0.0/note_add_page.php?f_page_id=&f_url=/path_mentor_new/index.php

        so that when I click, I get the message that this page is not indexed in the database.

        Do I need to change anything besides __FILE__? I am happy to take the time to work this out myself if necessary but if it's easy for you to answer, I'd appreciate it since I am hoping to demo this for a colleague this week.

        Thanks,

        Kathie (kaf1@pitt.edu)

         
        • Kenzaburo Ito

          Kenzaburo Ito - 2001-04-16

          Hmm, it's trying to find the entry but it came back with nothing.

          The function get_page_id() is called from core_API.php line 199.  This is the one that should return the correct page_id.

          get_page_id() is defined on line 270.  You'll probably have to trace the execution and use some echo statments to see what might be wrong.  Also, you might need to try out the sql selection statement manually and see what happens.

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.