Код:
<?php
include("config.php");
if($_SESSION['is_logged']===true)
{
$query = run_q('SELECT x, y FROM users WHERE user_id='.$_SESSION['user_info']['user_id']);
$row = mysql_fetch_assoc($query);
echo $row['x'];
echo " ";
echo "|";
echo " ";
echo $row['y'];
}
else
{
header('Location: index.php');
exit;
}
?>
<html>
<head>
<title>Game Map - <?php echo "X:"; echo $row['x']; echo " "; echo "Y:"; echo $row['y']; ?> </title>
</head>
<body>
<center>
<form actio = "" method = "POST">
<br><input type = "submit" naeme = "up" value = "Up"></br>
<br><input type = "submit" name = "left" value = "Left">
<input type = "submit" name = "right" value = "Right"></br>
<br><input type = "submit" name = "down" value = "Down">
</center>
</body>
</html>
<?php
if (isset($_POST['up'])) {
$curx = $row['x'];
$newx = $curx+1;
$que = run_q("UPDATE users SET x=$newx WHERE user_id='.$_SESSION['user_info']['user_id']); //// ред 40
}
?>
Код:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/cheetahb/public_html/new/map.php on line 40