You are here: alternative $link if no id exists in URL « PHP Language « IT news, forums, messages
alternative $link if no id exists in URL

Posted by 1 on 12/09/05 05:40

I was wondering how I can do the following.



Example: When a surfer goes to index.php there is a list of links including
example.php. I only want the link to appear as example.php if a id variable
is given in the url. Example. www.mydomain.com/index.php?id=564, if not "ID"
is given, example www.mydomain.com/index.php or
www.mydomain.com/index.php?othervariable=5, I would like the example.php
link to go to example2.php instead of example.php.



Something like: $link = example, if no ID exists, $link=example2. In the
source the link will appear as www.mydomain.com/$link.php.



I am new to php and don't know how I would put this in proper code. Hope
someone can help.

 

Navigation:

[Reply to this 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

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