Jump to content

Hello Friends - Experiencing Syntax Error, Help Appreciated


BlackStones

Recommended Posts

Here is the error code I am receiving;

 

Parse error: syntax error, unexpected $end (line 41)

 

The error message has consistently identified the statement in the else clause.  Thanks for any help.

<?php session_start(); ?>

   <!DOCTYPE html PUBLIC "-//W3C//DD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

       <head>
       
	 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"  />
         <title>Blah</title>
         <link rel="stylesheet" type="text/css" href="defaultcss.css" />

       </head>

	  <body>
	
	      <div id ="wrapper">
	
	      <h2>Blah Forum Demo</h2>
	
	      <p>Creating basic login functionality</p>
	
	<?php
	
	if (!isset($_SESSION['uid'])) 
	{
		echo "<form action = 'login_parse.php' method ='post'>
		Username: <input type ='text' name='username' />  
		Password: <input type ='password' name='password' />  
		Submit: <input type ='submit' name='submit' value='Log In' />
		";
	}
	else
	{
		echo "<p>You are logged in as ".$_SESSION['username']." • <a href='logout_parse.php'>Logout</a>;
	}
	?>
	
	</div>
	
	</body>

</html>		

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.