<html>
<head>
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
<!--
function login(t)
{
var t = '<?php echo $id; ?>';
alert(t);
}
-->
</SCRIPT>
</head>
<body>
<?php
$id=$_GET['id'];
print "<input type='button' name='button' value='button' onClick='login('$id')'>";
?>
</body>
</html>
i want to alert the variable using onclick function.