'clicking dropdown menubar item shows blank page in php

I've have a menubar item with the name Activity which on hover prints Items and Lists. The code belonging to the menubar item Activity is shown below:

<li>
    <section>
        <div style="width:100%;">
            <a href="index.php?location=actionsMenu:index"><?=$ab_string['activity']; ?></a>
        </div>
        <div class="sm">
            <div class="span">
                <ul>
                    <li><a href="index.php?location=actionsMenu:index"><?=$ab_string['items'];?></a></li>   // Line A for dropddown Items 
                    <li><a href="index.php?location=actionsMenu:lists"><?=$ab_string['lists'];?></a></li>   // Line B for dropdown Lists
                </ul>
            </div>
        </div>
    </section>
</li>

On doing hover to Activity menubar item, it shows dropdown Items and Lists. On clicking dropdown Items, I am seeing the blank page.

Problem Statement: I am wondering what changes I need to make at Line A so that it doesn't show blank page on clicking Items.

php


Solution 1:[1]

<a href="index.php?location=actionsMenu:index&data=<?=$ab_string['items'];?>"><?=$ab_string['items'];?></a>
<a href="index.php?location=actionsMenu:lists&data=<?=$ab_string['lists'];?>"><?=$ab_string['lists'];?></a>

Put the variable to the href, and using $_GET['data'] to retrieve the value.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1