Jump to content

[SOLVED] Recognising events from menu-item


ashrafzia

Recommended Posts

I have a javascript menu and i want to load the same page when the menu item is clicked but how can i recognise that, that specific item is clicked ? and then i can handle it by some check (if-else).

For example:

Students

    |   

    V

Add Students

Del Students

Search Students

 

How to handle/recognise an event which is raised by clicking on the menu item ?

 

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/73745-solved-recognising-events-from-menu-item/
Share on other sites

Pass a variable via the url, then simply check the $_GET array. eg;

 

<?php

  if (isset($_GET['action'])) {
    $action = $_GET['action'];
    // now you can call specific functionality
    // based on the value in $action.
  }

?>

 

Can you please show me how to pass a variable via the url? any code example ?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.