just a relative link like '?p=credit' should work; it'll always be index.php, right? And that will work in whatever folder it happens to be in.
If you want the full path, use `<?php echo FULLWEBPATH . '/index.php?p=credit'; ?>` (edit: That may not work in 1.0.3. Darn, I should release 1.0.4 already...)
What's changing about the link that you're worried about?