вот мой код:что случилось с моим кодом? 9
Примечание: Undefined индекс: идентификатор в C: \ XAMPP \ HTDOCS \ 3 \ header.php на линии 36 Примечание: Undefined индекс: идентификатор в C: \ XAMPP \ HTDOCS \ 3 \ header.php на линии 47
<tr>
<td>
<table align=center>
<tr align=center>
<td><a href="index.php">Ask</a> | </td>
<td><a href="search.php">Questions</a> | </td>
<?php if ($_SESSION['id'] == ""): ?>
<td><a href="login.php">Login</a> | </td>
<td><a href="register.php">Register</a></td>
<?php else: ?>
<td><a href="expdir.php">Expert Directory</a> | </td>
<td><a href="logout.php">Logout</a> </td>
<?php endif; ?>
</tr>
</table>
<table align=center>
<tr align=center>
<?php if ($_SESSION['id'] != ""): ?>
<td><a href="cpanel.php">My Control Panel</a> | </td>
<td><a href="search.php?id=<?php echo $_SESSION['id']; ?>
">My Questions</a> | </td>
<?php if ($_SESSION['type'] == 'expert'): ?>
<td><a href="feedback.php">Feedback</a> | </td>
<?php endif; ?>
<td><a href="pm_inbox.php">Private Messenger</a> | </td>
<td><a href="reports.php?action=Accepted">Reports</a> | </td>
<td><a href="contact.php?action=Accepted">Contact</a> </td>
<?php endif; ?>
</tr>
</table>
</td>
</tr>
'$ _SESSION [ 'ID'] 'undefined –
Вы должны также убедиться, что вы вызываете' session_start() 'перед доступом к супер глобальному' $ _SESSION'. Я бы порекомендовал читать на сессии обработки в php: http://www.php.net/manual/en/intro.session.php –