Hiding/Activating functions (Another question, I know :P)

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
Fuzzo
Forum Newbie
Posts: 15
Joined: Tue Jun 26, 2007 1:07 pm

Hiding/Activating functions (Another question, I know :P)

Post by Fuzzo »

I know am probably asking way too many questions than is healthy but I have to find out these things some way :S

So the basics of what am trying to achieve are as follows

USER VISITS GALLERY PAGE (gallery.php)

CATEGORIES use ( <?php displayCategories($phpfile);?> )
(ONCE CLICKED)
\/ display

THUMBNAILS use ( <?php displayList($phpfile, "thumbnail");?> )
(ONCE CLICKED)
\/ display

IMAGES use ( <?php displayImage($id);?> )


I thought there might be a way to activate these functions when a user clicks on the appropriate section.

Hope this makes sense.

Thanks :P
User avatar
idevlin
Forum Commoner
Posts: 78
Joined: Tue Jun 26, 2007 1:10 pm
Location: Cambridge, UK

Post by idevlin »

What do you mean by "activate"? Do you mean that when a user clicks on a specified link, that the function itself is called and then run?
Fuzzo
Forum Newbie
Posts: 15
Joined: Tue Jun 26, 2007 1:07 pm

Post by Fuzzo »

Well I know that would be the easiest solution

But as I understand it, its kind of impossible because to activate a function it has to go through the server - which wouldnt happen?

Correct me if am talking nonsense! Im looking for some kind of alternative :P
User avatar
idevlin
Forum Commoner
Posts: 78
Joined: Tue Jun 26, 2007 1:10 pm
Location: Cambridge, UK

Post by idevlin »

Well you could just reload the page and run the specified function...
Fuzzo
Forum Newbie
Posts: 15
Joined: Tue Jun 26, 2007 1:07 pm

Post by Fuzzo »

How would I make the page reload with the specified function? Thanks for your help.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Likely, URL based controls.
User avatar
idevlin
Forum Commoner
Posts: 78
Joined: Tue Jun 26, 2007 1:10 pm
Location: Cambridge, UK

Post by idevlin »

As feyd said, using something in your URL.

e.g.
When someone clicks on a specified link it either reloads the same page or a different one and passes in a parameter which your PHP script reads and then decides to run the extra function that you want it to run.
Post Reply