Jump to content

[SOLVED] in URL: <?php $_GET['nPageNo']> Is this correct?


y2yang

Recommended Posts

Can anyone tell me if I used the "<?php $_GET['nPageNo']>" correctly in there?

 

<a href="http://<?php echo $_SERVER['SERVER_NAME']; ?>/starhome/photo/read/read.php?nPageNo=<?php $_GET['nPageNo']>&Article=<?php print $list['id']; ?>">

 

 

 

Extra info, in case you wanted to know what I am doing with the above code, or wish to achieve with it:

 

What am I doing:

I have an image pagination and when I clicked on a image to go and view it, I also implemented that image pagination in there.

 

Example:

 

If the current page I am on URL is: list.php?nPageNo=3

 

Then when I clicked on an image to go and view it, I would like for the URL to be something like this: read.php?nPageNo=3&Article=19

 

Where id nPageNo from list.php is transfered to read.php with &Article=THE_ARTICLE_ID

 

Thank.

Link to comment
Share on other sites

Thank you soooooo much Ken2k7.

 

You are life savor for the past few weeks in my life.

 

 

Anyway, my pagination is now completed all thanks to you.

 

My next project is trying to convert my hard coded read page into programmed, in other word, automatic, I just love that word. This will help to convert my repeated of same code over 10000+ lines of code (which is just a bunch of elsesif elseif elseif lines, sad huh?) into less than 100 lines of code, and the best part, it's automatic so no need to edit everytimes I add photo to my library.

 

Anyway for the time being, I'll like to give you a sneak peak at my hard coded read page which will be programmed....

 


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.