do you want to click a link and at the same time submit a form (which contains checkbox data)?
well, I would do this with a form and submit button, this is the only way to have the checkbox data passed.
if for some reason you absolutely need a link for doing this, you can make a dummy link that acts like a submit button:
<a href=# onClick=submit()>the link</a>
instead of the submit button I use in the example.
The example shows how it's done with a normal form:
<?
if(isset($ok))
{
if($ms == '1')
$url = "www.microsoft.com";
else
$url = "www.php.net";
header("Location: http://$url");
exit;
}
// form code ---
?>
<body>
<form action=<?=PHP_SELF ?>>
Ready to go to www.php.net?
<input type=checkbox name=ms value=1>
No, I prefer Microsoft.
<input type=submit name=ok value=Ok>
</form>
</body>