Code: Select all
if(isset($_POST['pid1']) && isset($_POST['pid2'])) {
$pid1 = $_POST['pid1'];
$pid2 = $_POST['pid2'];
mysqli_query($db,"INSERT into arenainfo (pid1,pid2,) VALUES ('$pid1','$pid2')");
}I cant see anything wrong with that code...
And my second issue is on sending multiple queries by using mysqli_query.
From what I heard mysqli_query sends only 1 query at a time ,not like mysql_query which can send an unlimited amount.
So I googled on this a little and found out that some people used mysqli_multi_query..but this didnt work either.
My code is something like this:
Code: Select all
for($i=1;$i<=3;$i++)
{
echo "player1 attacks player2 for 3 points of damage";
mysqli_query($db,"update players set hpoints=hpoints-3 where name='$player2'");
}Someone got any ideeas on this?