Variable dies

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rosaka
Forum Newbie
Posts: 13
Joined: Mon Jan 10, 2011 2:00 pm

Variable dies

Post 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?
Peter Kelly
Forum Contributor
Posts: 143
Joined: Fri Jan 14, 2011 5:33 pm
Location: England
Contact:

Re: Variable dies

Post by Peter Kelly »

I havent looked at the code your posted but try changing & to & in the links you posted.
Rosaka
Forum Newbie
Posts: 13
Joined: Mon Jan 10, 2011 2:00 pm

Re: Variable dies

Post by Rosaka »

Nope didnt do the trick :(
Peec
Forum Commoner
Posts: 33
Joined: Fri Feb 22, 2008 3:58 am

Re: Variable dies

Post by Peec »

<?php $console; ?>
should be
<?php echo $console; ?>
Rosaka
Forum Newbie
Posts: 13
Joined: Mon Jan 10, 2011 2:00 pm

Re: Variable dies

Post by Rosaka »

Made my day, thx alot that worked!
Peter Kelly
Forum Contributor
Posts: 143
Joined: Fri Jan 14, 2011 5:33 pm
Location: England
Contact:

Re: Variable dies

Post by Peter Kelly »

Haha missed out the obvious :P O well glad its fixed :)
Post Reply