I am facing a proble while sending multiple data in javascript..Let me demonstrate my code..
<td><input type="button" onclick="deletecom(<?php echo
$id,$employee>)"name="delete" value="Delete"></td>
</tr>
<script language="javascript">
function deletecom(delcom,delcom1)
{
if(confirm("are u sure"))
{
window.location.href='delete_commision.php?del_com='+delcom+
'&del_com1='+delcom1+;
return true;
}
}
</script>
Here is my delete_commision.php code
<html>
<body>
<?php
include("index.php");
include("includes/connect.php");
$del_com=$_GET['del_com'];
$del_com1=$_GET['del_com1'];
echo $del_com,$hello;
echo $del_com1;
?>
</body>
</html>
The problem is that when I used to click or send the arguments it not showing the values of second variable..
here is the output..
Notice: Undefined index: del_com1 in C:\xampp\htdocs\Neisha\delete_commision.php on line 7
21
Here the 21 is the value that I am passing i.e ID
The 1st variable is showing the correct value but I am not understanding the second one's problem