Do you have something like this on your page?
$start = 1;
If yes, did you put it in an IF statement like this?
if(!isset($start)){
$start=1;
}else{
$start=$start;//this line not necessary to work, just here for mental
visualization
}
try putting (echo 'start = '.$start;) at the very beginning of the script
on gallery.php. When you click the links, is $start reflecting the value you
want?
You need to give more info for us to help you much more than this. A snippet
of your code or something.
Starting out, I made the mistake of declaring a variable in my script
without the IF ISSET statement, thereby overwriting the variable every time.
Putting the IF ISSET statement in there will see if $start is set and if it
is, it will leave it alone! If it's not set, the server will assume the user
has just arrived at the page, and set the $start value to 1.
Let us know!
--ScareCrowe
"Joe Lui" <jo*****@hotmail.com> wrote in message
news:66**************************@posting.google.c om...
Hello everyone,
I am new to PHP and web server in general so please bear with me if
it's an obvious mistake.
My problem is that parameters entered in URL do not update php
variables. I am using IIS on winxp pro with the latest php installed.
PHP seems working fine, i.e. <?php echo '<p>Hello World</p>'; ?>
works as expected.
I am building an automated photo gallery that displays 15 thumbnails
on a page. The starting thumbnail is controlled by a variable called
$start, with initial value = 1. To see the next 15 thumbnails, $start
will be updated to 16. The link look like this: <a
href="gallery.php?start=16">. However, $start is not updated after
the link is clicked. What did I miss?
Is it a php programming problem? Or do I need to configure (if
necessary) my web server? can anyone provide a simple example to
demonstrate how URL parameters work? Please help. Thank you.
Joe
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----