Page 1 of 1

Variable dies

Posted: Sun Jan 23, 2011 3:46 pm
by Rosaka
Hi, I got a problem with my variable dieing, when i require the view.

http://pastebin.com/hws7jcfQ

http://pastebin.com/r2jwZAgM

<a href="games.php?orderBy=price&console=<?php $console; ?>">Order By price</a>
<a href="games.php?orderBy=rating&console=<?php $console; ?>">Order By Rating</a>
<a href="games.php?orderBy=date&console=<?php $console; ?> ">Order By Date</a>

This is where when, you click the button it refreshes and sends $console back again, so the page knows which console, but console has died by this point?

Re: Variable dies

Posted: Sun Jan 23, 2011 3:49 pm
by Peter Kelly
I havent looked at the code your posted but try changing & to & in the links you posted.

Re: Variable dies

Posted: Sun Jan 23, 2011 3:52 pm
by Rosaka
Nope didnt do the trick :(

Re: Variable dies

Posted: Sun Jan 23, 2011 4:08 pm
by Peec
<?php $console; ?>
should be
<?php echo $console; ?>

Re: Variable dies

Posted: Sun Jan 23, 2011 5:24 pm
by Rosaka
Made my day, thx alot that worked!

Re: Variable dies

Posted: Sun Jan 23, 2011 6:08 pm
by Peter Kelly
Haha missed out the obvious :P O well glad its fixed :)