I really can't see a reason to do what you want with a function (unless I'm not understanding what it is that you want to do)
The easiest way to redirect with variable is to just make a link to it.
<a href="desired_page.php?num=5">Click here for number 5</a>
or you can do it with a variable
<?php $num = 5; ?>
<a href="desired_page.php?num=<?php echo $num;?>">Click here for number <?php echo $num;?></a>
If you really want to make a function to do this, then you would want to use a header. I haven't really used any functions for php before, so I'm going to assume that your function setup is correct and just show how to redirect with a header:
function showIndForm($num) {
Header("Location: desired_page.php")
}
I think that's right, but I'm not sure because I try not to use headers whenever I can help it because they need to be called before any output is displayed (echo statements or html tags or anything). To do headers right, you should check out the php manual on headers. The point is, if you want to redirect with a function, you probably want a header.