GET-ting Two Pieces of data from a Hyperlink Select

Hi All,

I’m trying to create a script that runs on a click from a hyper-link. I’ve done it before but wanted to add some more complexity.

I want to GET two pieces of information when it is the link is selected. Here is the html page with the link code:

<a class="title" href="?action=link ;id=<?php htmlout($adv['id']); ?>;pageabr=<?php htmlout($adv['pageabr']); ?>"><?php echo htmlspecialchars($adv['words'], ENT_QUOTES, 'UTF-8'); ?></a>

As you can (hopefully) see, the ‘href’ echoes out two pieces of information (a) ID and (b) pageabr. These are then used in the index file like so:

if (isset($_GET['action']) and ($_GET['action'] == 'link') and isset($_GET['id']) and ($_GET['pageabr']))
{
...
}

Unfortunately, I get the error of an ‘undefined index: pageabr’ for my line in the index file.

My question: are these two codes correct - can it be done like this? Any thoughts would be great. I really need both pieces to make my script function.

Thanks in advance

You should have ampersands connecting the key/value pairs in your query string, not semicolons

?action=link&id=something&pageabr=something

Thanks, Dan! it works!