You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
<?php
session_start();
require_once('function_userdata.php');
require_once('bd.php');
print_r($_SESSION['id']);
?>
<br />
<div class="content" style = "text-align: center;">
<?
$ssid=$_SESSION['id'];
$query = "SELECT `login`,`password`,`email` FROM `reg_users` WHERE `id`=" .$_SESSION['id'];
$result = mysql_query($query);
if (!$result)
{
die(mysql_error());
}
else
{
$myrow = mysql_fetch_assoc($result);
}
return $myrow;
echo " Dani Profil ";
echo '<table border="1" text align="center">';
echo '<thead>';
echo '<tr>';
echo '<th><h1>login</h1></th>';
echo '<th><h1>password </h1></th>';
echo '<th><h1>E-Mail<h1></th>';
echo '</tr>';
echo '</thead>';
echo '<tbody>';
$a = get_userdata();
echo '<tr>';
echo '<td><h2>' . $a['login'] . '</h2></td>';
echo '<td><h2>' . $a['password'] . '</h2></td>';
echo '<td><h2>' . $a['email'] . '</h2></td>';
echo '</tr>';
echo '</tbody>';
echo '</table>';
echo "<p> Good morning <b>".$_SESSION['login']."</b>!";
echo "<p><a href='avatar.php'>avatar redact</a></p>";
echo "<p><a href='setavatar.php'>SET avatar</a></p>";
echo "<p><a href='avatardk.php'>avatarDK</a></p>";
?>
<table align="center">
<a href="editpro.php"><input type="submit" name="update" value="update"></a>
<a href="delprof.php"><input type="submit" name="da" value="delete akkaunt"></a>
<a href="logout.php"><input type="submit" name="logout" value="logout"></a>
</table>
</div>