Jump to content

Hello Friends - Experiencing Syntax Error, Help Appreciated


BlackStones
Go to solution Solved by 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>		
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.