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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.