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
https://forums.phpfreaks.com/topic/156859-solved-in-url/
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
https://forums.phpfreaks.com/topic/156859-solved-in-url/#findComment-826302
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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