Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<nav id="nav">
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
?>
<?php
$username = 'root';
$password = 'root';
$myPDO = new PDO("mysql:host=localhost;dbname=baby_cms", $username, $password);
$rows = $myPDO->query("SELECT * FROM pages");
?>
<ul>
<?php
foreach ($rows as $row){
echo "<li>";
echo "<a href='page.php?id=". $row['id'] . "'/>";
echo $row['title'];
echo "</a>";
echo "</li>";
}
echo "<li>";
echo "<a href='edit.php'/>";
echo "Add New Page";
echo "</a>";
echo "</li>";
echo "<li>";
echo "<a href='edit.php?id=" . $row['id'] . "'/>";
echo "Edit Current Page";
echo "</a>";
echo "</li>";
?>
</ul>
</nav>