Ik ben bezig met het volgende:
Bepaalde links weergeven wanneer een gebruiker is ingelogd en weer andere links weergeven als er niemand is ingelogd. Echter, ik krijg een vreemde syntax foutmelding.
Foutmelding: Parse error: syntax error, unexpected '{' in includes/header.php on line 16
Verder heb ik andere vragen mbt header.php:
Moet ik de HTML-specialchars in het menu encoden?
Aangezien het bestand header.php in de map includes zit moet ik een niveau hoger wil komen bij andere bestanden en moet ik in dit geval php path gebruiken?
Alvast bedankt voor het meedenken.
Code header.php
<?php
error_reporting(E_ALL);
ini_set('display_errors', 'On');
?>
<!DOCTYPE html>
<html>
<head>
<title>Hawar Co - Pharmacy Control Management</title>
<link rel="stylesheet" type="text/css" href="main.css" />
</head>
<body>
<div id="wrapper">
<div id="header"></div>
<div id="navigation">
<div id="nav">
<?php (isset($_SESSION['user_id'])) {
echo "<ul>
<li><a href='../index.php'>Home</a></li>
<li><a href='../medicines.php'>Medicines »</a>
<ul>
<li><a href='../medicines.php'>Medicines</a>
<ul>
<li><a href='../med_insert.php'>Insert Medicines</a></li>
</ul>
</li>
<li><a href='../medicinescompanies.php'>Medicines companies</a>
<ul>
<li><a href='../medcom_insert.php'>Insert medicines company</a></li>
</ul>
</li>
<li><a href='../medicinescountries.php'>Medicines countries</a>
<ul>
<li><a href='../medcoun_insert.php'>Insert medicines countries</a></li>
</ul>
</li>
</ul>
</li>
<li><a href='../patients.php'>Patients</a>
<ul>
<li><a href='../insert_patient.php'>Insert patient</a></li>
</ul>
</li>
<li><a href='../medicinesfinance.php'>Finance</a></li>
<li><a href='../medicinesreports.php'>Reports</a></li>";
} else { echo "<li><a href='../contact.php'>Contact</a></li></ul>"; }?>
</div>
<div id="profile"><p></p></div>
</div>
<div id="contentliquid"><div id="content">