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
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.
  }

?>

Link to comment
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 ?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.