Required this kind of system

Discussion in 'PHP' started by rajin, Nov 25, 2012.

  1. #1
    http://www.onemanga.com/Naruto/

    it has category and description page and even few other recommendations. it actually is printing chapters list

    i am able to create desc page which prints chapters but it not open as default

    so when i try http://www.mydomain.com/Naruto/ it opens most recent chapter like http://www.mydomain.com/Naruto/600

    anyone help please.
     
    rajin, Nov 25, 2012 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    Send the main PHP page the chapter number. Write the code to open the page for that chapter, or the list if there's no chapter number.

    Save the user's last read chapter in a cookie. When the user logs in, read the cookie to see where the user was the last time.
     
    Rukbat, Nov 27, 2012 IP
  3. rajin

    rajin Well-Known Member

    Messages:
    242
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #3
    i am able to print chapters on desc page i created . i need this [Write the code to open the page for that chapter]
    cookie is not much of value here i think
     
    rajin, Nov 27, 2012 IP
  4. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #4
    "Code to open the page" is

    <?php header('Location: http://www.mysite.com/chapter.html'); ?>

    Sending a cookie, and reading it when the user logs in, will let you send him back to the last page he was reading without his having to do anything (except, maybe, clicking a "Last page I was reading" button).
     
    Rukbat, Nov 28, 2012 IP
  5. rajin

    rajin Well-Known Member

    Messages:
    242
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #5
    rukbar you are clearly offtarget check . i have no need of such think as its not member based. i have send you pm check it you will understand automatically.
     
    rajin, Nov 29, 2012 IP
  6. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #6
    That's just 'paging', pulling graphic files from a database. Just select the first chapter's filename from the database, read the file and echo it. (The "back button should be disabled at this point, of course.) If the user clicks the Next button, select the next chapter's filename, read the file and echo it. From then on, do the same thing for the Next button, read the previous chapter's filename if the uset clicks the Back button, etc. (Keep track of whether you're at the first or last chapter, so you can turn on/off the Back and Next buttons as needed.)

    All the interaction between the user and the server is done using AJAX.
     
    Rukbat, Nov 30, 2012 IP