Jump to content


Photo

GET in the URLs


  • Please log in to reply
2 replies to this topic

#1 pixzeto

pixzeto
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 13 August 2006 - 05:16 AM

Hello! Nice forum :)

I have been "playing" with HTML and CSS for some time, and I have been learning some basic PHP programming lately... I don't have a lot of time for learning though.

I have made a site which uses PHP (see it here: http://niptunz.byeth...itioy/index.php) for displaying some things, like the main content and some messages on that thin black bar below the banner. I have also installed some PHP utilities, such as CuteNews.

Now, if I add a variable to the URL (is that the right way of referring to it?), let's say: http://niptunz.byeth...layer=no</span>, which displays a message saying "Aviso: no se encontrĂ³...." on the top bar, the links generated by CuteNews show the "flashplayer=no" part (http://niptunz.byeth...layer=no</span>), but the links on the left menu don't (well.... the only link hehehe).

So, if you click a link generated by CuteNews, the message will still be shown in the next page, but if you click a link on the menu, the message disappears.

How do I make the links on the left include the information already present in the URL too ?


Thanks in advance :)

#2 elhama

elhama
  • Members
  • PipPip
  • Member
  • 19 posts

Posted 13 August 2006 - 05:39 AM

yes, because when you click the link the flashplayer=no will dissapear, to prevent this, do like so on all the links:
<?php
if($_GET['flashplayer'] == "no")
$flashplayer = 'no';
else
$flashplayer = 'yes';

?>


<a href=link.php?flashplayer=<? echo $flashplayer; ?>>Link here </a>


#3 pixzeto

pixzeto
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 13 August 2006 - 07:48 PM

Thank you very much :) I was wondering... Are there other ways of doing it? Because CuteNews does it in another way for sure.

Thanx again




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users