I'm trying to update a database from two id's. One arrives with an other page. And one gets send by an element on the page. The problem is that both are send by GET so they keep changing each other. Is there anyway to fix this?
<?php
$id1 = $_REQUEST["id"];
echo $id1;
if($_GET["Action"] == "Wijzig")
{
include 'Includes/database_connection.php';
$strSQL = "UPDATE pairings SET sim_id='".$_GET["id"]."'";
$strSQL .="WHERE unit_id = '".$id1."' ";
$objQuery = mysql_query($strSQL);
}
\\Action on current page
<li><a href="JavaScript:if(confirm('Heeft u de goede geselecteerd?')==true){window.location='<?=$_SERVER["PHP_SELF"];?>?Action=Wijzig&id=<?=$row["id"];?>';}"><?php echo $row['phonenr'];?></a></li>
\\Action on previous page
<a href="#" onclick="window.open('test.php?id=<?php echo $row['id']; ?>', 'newwindow', 'width=5000, height=5000'); return false;" ><img src="images/arrowUpDown.png"/></a>