<head>
<script type="text/javascript">
function delete_confirm()
{
var r=confirm("Are you sure you want to delete this record?")
if (r==true)
{
<!--start to link to mysql to delete the particular record-->
}
}
</script>
</head>
my question is how to connect to mysql using the javascript if the user press button ok or true to comfirm he/she want to delete the record?
if i open the php tag in between like this
if (r==true)
{
<?
mysql_connect("localhost","student","123") or die (mysql_error());
...
?>
}
it is look like cant work after i tested..
Someone can guide me to complete my confuse...