how about something like this...for now, I would only like trying to call the navigation pane, and nothing else, at the bottom of the script. Here is the code so far, please tell me if i should add anything and/or fix something:
<?php
require 'database.php'; //includes database access instructions, and session_start()
$navicons ="?><img src="img.gif" alt="Change address!" width="41" height="41" border="0"></a>
<img src="img1.gif" alt="Log out!" width="41" height="41" border="0"></a> <?php ";?>
//TONS OF HTML IN BETWEEN
//TONS MORE HTML
//now, more PHP
<?php
if($logged_in == 1) {
die('You are already logged in, '.$_SESSION['username'].'.');
}
if (isset($_POST['submit'])) { // if form has been submitted
// authenticate. check that passwords match username, and now to the members page
echo $navicons;
?>
<p>Welcome <strong><?php echo $_SESSION['username'];?></strong>! Now that you are logged in, you are able to choose from the following:<br>
//MEMBER'S PAGE NONSENSE
//MORE NONSENSE
<?php
} else { // Now, if form hasn't been submitted, give them two text fields to type username and password
?>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
Username: <input type="text" name="uname" maxlength="40">
Password: <input type="password" name="passwd" maxlength="50">
<input type="submit" name="submit" value="Login!"> //Login button
<?php
}
?>
As you can see, I added the two pictures at the top into $navicons, and echoed $navicons right after the user is authenticated. However, I get an error on the line that says
"$navicons ="?><img src="img.gif" alt="Change address!" ........................."
I bet I have something petty wrong with the syntax, but I can't figure it out...thanks guys.
EDIT: Also, if you have any examples of something similar to this, could you please include it? I would be very grateful. Sorry guys, I'm kind of getting familiar with PHP.