Instead of using code like this:

```
'<td><a href="CancelClass.php?MemberId=' . $memberId .'&ClassId=' . $classId .' "> Cancel</a>

```

I would like to be able to simply call a function and pass the $memberId and $classId into that instead of having to create a new PHP page to run some code with these values.

So basically the user will click the 'cancel' button and then it will run a function from another class, instead of clicking the button and then having another page deal with the request.

How would I go about doing that?