PDA

View Full Version : url problem


benni
02-24-2005, 11:37 AM
Hi,

<a href="qxl.php?query='.$query.'&number='.$url_number.'">link desc</a>

The above link sends 2 variables to qxl.php, what i need is a link that will send the above two variables to the qxl.php script but to a function contained within the script.

The function is called getQXL and takes two arguments, i want to supply this function with the two variables above.

So when the user clicks on the link, the function within qxl.php is called.

How do i construct a link to do this??

Cheers.

Sayonara
02-24-2005, 12:12 PM
Add &action=QXL to the link, then set a condition to use the function:
if ($_GET['action'] == 'QXL') {
getQXL($_GET['query'], $_GET['number']);
}

benni
02-24-2005, 12:33 PM
Thxs mate, its worked a treat..

:thumbsup: :thumbsup: :thumbsup: :thumbsup:

Sayonara
02-24-2005, 01:20 PM
No probs ;)

I'd suggest validating the values you send to the function, since they're coming from a URL and could be easily modified.