I realize this has not been updated in 2 years and I was hoping you could still help. I am new to doing this and I am using this to create a website login. I like it and it works as is on my system but I would like to clean it up so that everything related to login and users be put on a Users folder in the root directory. So what I have done is changed the views directory to users directory. I have created a projects, reports, and schedule directories. I added this to the loginTrue.php now in the users directory.
<a href="projects/projects.php">Projects</a><br>
<!-- Schedule link -->
<a href="schedules/schedule.php">Schedule</a><br>
<!-- Reports link -->
<a href="reports/reports.php">Reports</a><br>
<!-- Users link -->
<a href="users/users.php">Users</a><br>
<!-- Profile link -->
<a href="profile.php">Account settings</a><br>
So each folder has a new php file named after the folder. Users.php has this code.....
query($sql);
if ($result->num_rows > 0) {
echo "<table style=width:80% align=center border=thick><tr><th>First Name</th><th>Last Name</th><th>Company</th><th>Email</th><th>Username</th></tr>";
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<tr><td>".$row["first_name"]."</td><td>".$row["last_name"]."</td><td>".$row["company"]."</td><td>".$row["email"]."</td><td>".$row["username"]."</td></tr><br>";
}
} else {
echo "0 results";
}
?>
</div>
Back to main
The problem is right here on the last line. When clicking the link it does go back to loginTrue.php but I lose all of the css in the header. The header is there but the formatting is off.
I understand if you are not around anymore or if you don't want to help. Again, your code works its just my understanding of how it works that is flawed :P
Thanks in advanced if you do try to help