Reply to incremental links adding to uri

Your name:

Reply:


Posted by mtuller on 11/16/07 21:11

I have links that display dates, incremented from one value up to
another. When I click on each link though, it adds the value to the
url. This is a snippet of the code:

for ($i=$first_year; $i<=$last_year; $i++)
{
echo '<td><a href="'.$_SERVER['PHP_SELF'].
$_SERVER['REQUEST_URI'].'?year='.$first_year.'">'.$first_year.'</a></
td>';
$first_year++;
}

The first time the link will be correct, then the second time it will
add ?year=2008 or whatever the value it to the uri. How can I make it
so that it doesn't keep adding to it, but replaces it?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация