dean7 Posted March 27, 2009 Share Posted March 27, 2009 Hi, Ive got a website that im coding but im trying to make it so when you login you can you username on the stats bar but im allways getting an error please help. Stats.php <? /* Include Files *********************/ session_start(); include("test.php"); include("index.php"); /*************************************/ ?> <style type="text/css"> <!-- .style3 {color: #0033FF} .style4 {color: #FFFFFF} body { background-color: #333333; } a:link { color: #0033FF; text-decoration: none; } a:visited { text-decoration: none; color: #0033FF; } a:hover { text-decoration: underline; color: #0033FF; } a:active { text-decoration: none; color: #0033FF; } --> </style> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> Username: (later) Logout <? if($logged_in){ echo 'Logged in as '.$_SESSION['username']. }else{ echo 'You need to log in! <a href="index.php">Login</a>'; }; ?> <script language=JavaScript> <!-- //Disable right mouse click Script //By Maximus ([email protected]) w/ mods by DynamicDrive //For full source code, visit http://www.dynamicdrive.com var message="Right click disabled thoughout the website! sorry."; /////////////////////////////////// function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("alert(message);return false") // --> </script> </body> </html> Im not sure if i need to show you any other files, but if so please say Link to comment https://forums.phpfreaks.com/topic/151458-help/ Share on other sites More sharing options...
Mchl Posted March 27, 2009 Share Posted March 27, 2009 First of all you should tell us what is the error you're getting. Change echo 'Logged in as '.$_SESSION['username']. to echo 'Logged in as '.$_SESSION['username']; Link to comment https://forums.phpfreaks.com/topic/151458-help/#findComment-795543 Share on other sites More sharing options...
dean7 Posted March 27, 2009 Author Share Posted March 27, 2009 Parse error: syntax error, unexpected '}' in /home/a7193309/public_html/stats.php on line 46 But im not sure what ones to remove ive tryed deleting certain ones but didnt work Link to comment https://forums.phpfreaks.com/topic/151458-help/#findComment-795544 Share on other sites More sharing options...
dean7 Posted March 27, 2009 Author Share Posted March 27, 2009 First of all you should tell us what is the error you're getting. Change echo 'Logged in as '.$_SESSION['username']. to echo 'Logged in as '.$_SESSION['username']; Tryed that and now i just get the login page were the stats bar is meant to be. Link to comment https://forums.phpfreaks.com/topic/151458-help/#findComment-795547 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.