Assuming there is a logoutButton form element on the page, I dont see a problem with the code.
I would use a hidden form element for the log out trigger to get around an IE bug where the submit button is sometimes not sent with the form:
<form id="form1" method="post" action="logout.php">
<strong>
<input name="logoutButton" type="hidden" id="logoutButton" value="Log Out" />
</strong>
<label>
<input type="submit" name="button" id="button" value="Log Out" />
</label>
</form>
and add the clear session value to the logout.php page.