Q695 Posted October 6, 2012 Share Posted October 6, 2012 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'); } Quote Link to comment https://forums.phpfreaks.com/topic/269146-door-not-changing-data-properly/ Share on other sites More sharing options...
ManiacDan Posted October 6, 2012 Share Posted October 6, 2012 Which bit is the offset section? What do you consider "wrong"? What, pray tell, would be "right"? Quote Link to comment https://forums.phpfreaks.com/topic/269146-door-not-changing-data-properly/#findComment-1383152 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.