</head>
Code blocks are created by indenting at least 4 spaces
... and can span multiple lines
<body>
<script type="text/javascript">
function show_confirm($uid)
{
var r=confirm("Press a button!");
if (r==true)
{
<?php header(location: sample.php?id=$uid)?>
}
else
{
alert("You pressed Cancel!");
}
}
</script>
</head>
<body>
<input type="button" onclick="show_confirm($uid)" value="delete command
" />
guy help me to this code.. a want to add javascript dialog box to my delete and then the function if yes it will submit the value of $uid to the next page to process the delete in php code. i want to know or any sample code there for passing id through function? and how?