Jump to content

Door Not Changing Data Properly


Q695

Recommended Posts

what seems to be going wrong with the offset section of data?

 

if (isset($_GET['move_x']) || isset($_GET['move_y']) || isset($_GET['door'])){
if (isset($_GET['door'])){
$door=$_GET['door'];
 $sqld = "select * from doors where id='$door'";
 $resultd = mysql_query($sqld, $con) or die ("can not generate result " . mysql_error());
 $rowd = mysql_fetch_assoc($resultd);
 print_r($rowd);



 if ($cz=$rowd['L1']){
 $sqlc="UPDATE user_data SET `c_x` = '$rowd[X2]', `c_y` = '$rowd[Y2]', c_z = '$rowd[L2]' WHERE id =$id";
 echo $sqlc . "<br>";
 } else if ($cz=$rowd['L2']){
 $sqlc="UPDATE user_data SET `c_x` = '$rowd[X1]', `c_y` = '$rowd[Y1]', c_z = '$rowd[L1]' WHERE id =$id";
 echo $sqlc . "<br>" . print_r($rowd);
 }



}
if (isset($sqlc)){
$result = mysql_query($sqlc, $con) or die ("can not generate result " . mysql_error());
 }
header('Location: ?page=1');
}

Link to comment
https://forums.phpfreaks.com/topic/269146-door-not-changing-data-properly/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.