help i try everthing to fix this code i got all the other stuff working but this havent added the body yet want to fix error 1st
<?
// members page
session_start();
if ( empty( $username ) ) {
print "Please login below!";
include 'login.html'
} else {
?>
<html>
<head>
<title>MEMBERS ONLY</title>
</head>
<body>
Your Members Page…
</body>
</html>
<?
?>
you are missing the closing brace that ends your else statement
which brace and were sry im still learning php. dont i need the brace on line 13 right? thanks for your time
PHP is a little too strict about things. if you open something with a {, you have to close it with a }. Your else{} clause opens but never closes. Just add a } at the end of your PHP code block.
<?php
// members page
session_start();
if ( empty( $username ) ) {
print "Please login below!";
include 'login.html'
} else {
?>
<html>
<head>
<title>MEMBERS ONLY</title>
</head>
<body>
Your Members Page....
</body>
</html>
<?php
} // this is the brace that was missing - it closes the else statement above
?>
lol thanks hate them brackets they always give me the hardest of times.
Get an editor that tracks your brackets for you. Notepad++ is what I use most of the time.