Log in

View Full Version : Members Only



additional
25-02-2007, 04:53 PM
Accidently exited the window before when I was about to submit so if it is short you can understand why. I am wanting to know if I can put a HTML page in the PHP Usersystem by Techtuts.

Example one: "Community.php" - My community page.


<html>
<head>
<title></title>
<style type="text/css">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; }
A{color:#000000; font-family:veranda; text-decoration:none; }
A:Visited{color:#000000; font-family:veranda; text-decoration:none; }
A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>
</head>
<body bgcolor="#fefefe">
<div align="center"><font face="Verdana"><strong>
<p align="center">
<img title="" height="66" alt="" src="/images/habbo1.PNG" width="518"></p></strong></font></div>
<div align="center"><strong>&nbsp;</strong></div><font face="Courier">
<div align="center">
<table style="width: 210px; border-collapse: collapse; height: 256px;" bordercolor="#000000" height="256" cellspacing="0" cellpadding="3" width="210" border="0">
<tbody>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide12.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="jobs.php" target="content">Jobs</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide13.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="about.php" target="content">About Us</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide14.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="staff.php" target="content">Staff</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide15.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="comps.php" target="content">Competitions</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide16.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="events.php" target="content">Events</a></font></div></td></tr></tbody></table></div>
<div align="center">&nbsp;</div>
<div align="center"><font face="Verdana" color="#000000" size="1"><a href="/staffloginpage.php" target="content">Staff login</a></font></div></font>
<div align="center"><font face="Verdana">&nbsp;</font></div>
<div align="center"><strong><font face="Verdana">&nbsp;</font></strong></div>
<div align="center"><font face="Verdana">&nbsp;</font></div>
</body>
</html>

This is the members only PHP code.


<?
ob_start();
include("config.php");
if ($logged[username])
{
echo("You are logged in");
}
else
{
echo("You are not logged in");
}
?>

I tried this:


<?
ob_start();
include("config.php");
if ($logged[username])
{
echo("<html>
<head>
<title></title>
<style type="text/css">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; }
A{color:#000000; font-family:veranda; text-decoration:none; }
A:Visited{color:#000000; font-family:veranda; text-decoration:none; }
A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>
</head>
<body bgcolor="#fefefe">
<div align="center"><font face="Verdana"><strong>
<p align="center">
<img title="" height="66" alt="" src="/images/habbo1.PNG" width="518"></p></strong></font></div>
<div align="center"><strong>&nbsp;</strong></div><font face="Courier">
<div align="center">
<table style="width: 210px; border-collapse: collapse; height: 256px;" bordercolor="#000000" height="256" cellspacing="0" cellpadding="3" width="210" border="0">
<tbody>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide12.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="jobs.php" target="content">Jobs</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide13.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="about.php" target="content">About Us</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide14.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="staff.php" target="content">Staff</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide15.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="comps.php" target="content">Competitions</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide16.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="events.php" target="content">Events</a></font></div></td></tr></tbody></table></div>
<div align="center">&nbsp;</div>
<div align="center"><font face="Verdana" color="#000000" size="1"><a href="/staffloginpage.php" target="content">Staff login</a></font></div></font>
<div align="center"><font face="Verdana">&nbsp;</font></div>
<div align="center"><strong><font face="Verdana">&nbsp;</font></strong></div>
<div align="center"><font face="Verdana">&nbsp;</font></div>
</body>
</html>");
}
else
{
echo("You need to sign up to our member system!");
}
?>


I get this error:


Parse error: syntax error, unexpected T_STRING in /home/rob4/public_html/community.php on line 9

So am I able to use normal HTML or am I gonna have to use PHP in the echos?

Robbie
25-02-2007, 04:58 PM
USE THIS



<?
ob_start();
include("config.php");
if($logged[username] {
echo("<html>
<head>
<title></title>
<style type=\"text/css\">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; }
A{color:#000000; font-family:veranda; text-decoration:none; }
A:Visited{color:#000000; font-family:veranda; text-decoration:none; }
A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>
</head>
<body bgcolor=\"#fefefe\">
<div align=\"center\"><font face=\"Verdana\"><strong>
<p align=\"center\">
<img title=\"\" height=\"66\" alt=\"\" src=\"/images/habbo1.PNG\" width=\"518\"></p></strong></font></div>
<div align=\"center\"><strong>&nbsp;</strong></div><font face=\"Courier\">
<div align=\"center\">
<table style=\"width: 210px; border-collapse: collapse; height: 256px;\" bordercolor=\"#000000\" height=\"256\" cellspacing=\"0\" cellpadding=\"3\" width=\"210\" border=\"0\">
<tbody>
<tr>
<td valign=\"top\" width=\"50&#37;\">
<p align=\"right\">
<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide12.gif\" width=\"51\"></p></td>
<td valign=\"top\" width=\"50%\">
<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
<div><font face=\"Verdana\" size=\"1\"><a href=\"jobs.php\" target=\"content\">Jobs</a></font></div></td></tr>
<tr>
<td valign=\"top\" width=\"50%\">
<p align=\"right\">
<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide13.gif\" width=\"51\"></p></td>
<td valign=\"top\" width=\"50%\">
<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
<div><font face=\"Verdana\" size=\"1\"><a href=\"about.php\" target=\"content\">About Us</a></font></div></td></tr>
<tr>
<td valign=\"top\" width=\"50%\">
<p align=\"right\">
<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide14.gif\" width=\"51\"></p></td>
<td valign=\"top\" width=\"50%\">
<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
<div><font face=\"Verdana\" size=\"1\"><a href=\"staff.php\" target=\"content\">Staff</a></font></div></td></tr>
<tr>
<td valign=\"top\" width=\"50%\">
<p align=\"right\">
<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide15.gif\" width=\"51\"></p></td>
<td valign=\"top\" width=\"50%\">
<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
<div><font face=\"Verdana\" size=\"1\"><a href=\"comps.php\" target=\"content\">Competitions</a></font></div></td></tr>
<tr>
<td valign=\"top\" width=\"50%\">
<p align=\"right\">
<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide16.gif\" width=\"51\"></p></td>
<td valign=\"top\" width=\"50%\">
<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
<div><font face=\"Verdana\" size=\"1\"><a href=\"events.php\" target=\"content\">Events</a></font></div></td></tr></tbody></table></div>
<div align=\"center\">&nbsp;</div>
<div align=\"center\"><font face=\"Verdana\" color=\"#000000\" size=\"1\"><a href=\"/staffloginpage.php\" target=\"content\">Staff login</a></font></div></font>
<div align=\"center\"><font face=\"Verdana\">&nbsp;</font></div>
<div align=\"center\"><strong><font face=\"Verdana\">&nbsp;</font></strong></div>
<div align=\"center\"><font face=\"Verdana\">&nbsp;</font></div>
</body>
</html>");
}
else
{
echo("Not logged in");
}
?>

Inside echo(""); you have to replace "'s with /"

Frog!
25-02-2007, 05:00 PM
You can't have a quotation mark in another quotation mark.
You have to use an apostrophe :)


<?
ob_start();
include("config.php");
if ($logged[username])
{
echo('<html>
<head>
<title></title>
<style type="text/css">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; }
A{color:#000000; font-family:veranda; text-decoration:none; }
A:Visited{color:#000000; font-family:veranda; text-decoration:none; }
A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>
</head>
<body bgcolor="#fefefe">
<div align="center"><font face="Verdana"><strong>
<p align="center">
<img title="" height="66" alt="" src="/images/habbo1.PNG" width="518"></p></strong></font></div>
<div align="center"><strong>&nbsp;</strong></div><font face="Courier">
<div align="center">
<table style="width: 210px; border-collapse: collapse; height: 256px;" bordercolor="#000000" height="256" cellspacing="0" cellpadding="3" width="210" border="0">
<tbody>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide12.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="jobs.php" target="content">Jobs</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide13.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="about.php" target="content">About Us</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide14.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="staff.php" target="content">Staff</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide15.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="comps.php" target="content">Competitions</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide16.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="events.php" target="content">Events</a></font></div></td></tr></tbody></table></div>
<div align="center">&nbsp;</div>
<div align="center"><font face="Verdana" color="#000000" size="1"><a href="/staffloginpage.php" target="content">Staff login</a></font></div></font>
<div align="center"><font face="Verdana">&nbsp;</font></div>
<div align="center"><strong><font face="Verdana">&nbsp;</font></strong></div>
<div align="center"><font face="Verdana">&nbsp;</font></div>
</body>
</html>');
}
else
{
echo("You need to sign up to our member system!");
}
?>

That should work?

Robbie
25-02-2007, 05:01 PM
Wth are you talking about lol my post is correct


<?
ob_start();
include("config.php");
if($logged[username] {
echo("<html>
<head>
<title></title>
<style type=\"text/css\">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; }
A{color:#000000; font-family:veranda; text-decoration:none; }
A:Visited{color:#000000; font-family:veranda; text-decoration:none; }
A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>
</head>
<body bgcolor=\"#fefefe\">
<div align=\"center\"><font face=\"Verdana\"><strong>
<p align=\"center\">
<img title=\"\" height=\"66\" alt=\"\" src=\"/images/habbo1.PNG\" width=\"518\"></p></strong></font></div>
<div align=\"center\"><strong>&nbsp;</strong></div><font face=\"Courier\">
<div align=\"center\">
<table style=\"width: 210px; border-collapse: collapse; height: 256px;\" bordercolor=\"#000000\" height=\"256\" cellspacing=\"0\" cellpadding=\"3\" width=\"210\" border=\"0\">
<tbody>
<tr>
<td valign=\"top\" width=\"50&#37;\">
<p align=\"right\">
<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide12.gif\" width=\"51\"></p></td>
<td valign=\"top\" width=\"50%\">
<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
<div><font face=\"Verdana\" size=\"1\"><a href=\"jobs.php\" target=\"content\">Jobs</a></font></div></td></tr>
<tr>
<td valign=\"top\" width=\"50%\">
<p align=\"right\">
<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide13.gif\" width=\"51\"></p></td>
<td valign=\"top\" width=\"50%\">
<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
<div><font face=\"Verdana\" size=\"1\"><a href=\"about.php\" target=\"content\">About Us</a></font></div></td></tr>
<tr>
<td valign=\"top\" width=\"50%\">
<p align=\"right\">
<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide14.gif\" width=\"51\"></p></td>
<td valign=\"top\" width=\"50%\">
<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
<div><font face=\"Verdana\" size=\"1\"><a href=\"staff.php\" target=\"content\">Staff</a></font></div></td></tr>
<tr>
<td valign=\"top\" width=\"50%\">
<p align=\"right\">
<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide15.gif\" width=\"51\"></p></td>
<td valign=\"top\" width=\"50%\">
<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
<div><font face=\"Verdana\" size=\"1\"><a href=\"comps.php\" target=\"content\">Competitions</a></font></div></td></tr>
<tr>
<td valign=\"top\" width=\"50%\">
<p align=\"right\">
<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide16.gif\" width=\"51\"></p></td>
<td valign=\"top\" width=\"50%\">
<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>
<div><font face=\"Verdana\" size=\"1\"><a href=\"events.php\" target=\"content\">Events</a></font></div></td></tr></tbody></table></div>
<div align=\"center\">&nbsp;</div>
<div align=\"center\"><font face=\"Verdana\" color=\"#000000\" size=\"1\"><a href=\"/staffloginpage.php\" target=\"content\">Staff login</a></font></div></font>
<div align=\"center\"><font face=\"Verdana\">&nbsp;</font></div>
<div align=\"center\"><strong><font face=\"Verdana\">&nbsp;</font></strong></div>
<div align=\"center\"><font face=\"Verdana\">&nbsp;</font></div>
</body>
</html>");
}
else
{
echo("Not logged in");
}
?>

Replace " with /"

ZAG
25-02-2007, 05:01 PM
<?
ob_start();
include("config.php");
if ($logged[username])
{
?>
<head>
<title></title>
<style type="text/css">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; }
A{color:#000000; font-family:veranda; text-decoration:none; }
A:Visited{color:#000000; font-family:veranda; text-decoration:none; }
A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>
</head>
<body bgcolor="#fefefe">
<div align="center"><font face="Verdana"><strong>
<p align="center">
<img title="" height="66" alt="" src="/images/habbo1.PNG" width="518"></p></strong></font></div>
<div align="center"><strong>&nbsp;</strong></div><font face="Courier">
<div align="center">
<table style="width: 210px; border-collapse: collapse; height: 256px;" bordercolor="#000000" height="256" cellspacing="0" cellpadding="3" width="210" border="0">
<tbody>
<tr>
<td valign="top" width="50&#37;">
<p align="right">
<img title="" height="44" alt="" src="/images/guide12.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="jobs.php" target="content">Jobs</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide13.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="about.php" target="content">About Us</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide14.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="staff.php" target="content">Staff</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide15.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="comps.php" target="content">Competitions</a></font></div></td></tr>
<tr>
<td valign="top" width="50%">
<p align="right">
<img title="" height="44" alt="" src="/images/guide16.gif" width="51"></p></td>
<td valign="top" width="50%">
<div><font face="Verdana" size="1">&nbsp;</font></div>
<div><font face="Verdana" size="1"><a href="events.php" target="content">Events</a></font></div></td></tr></tbody></table></div>
<div align="center">&nbsp;</div>
<div align="center"><font face="Verdana" color="#000000" size="1"><a href="/staffloginpage.php" target="content">Staff login</a></font></div></font>
<div align="center"><font face="Verdana">&nbsp;</font></div>
<div align="center"><strong><font face="Verdana">&nbsp;</font></strong></div>
<div align="center"><font face="Verdana">&nbsp;</font></div>
</body>
</html>
<?php
}
else
{
echo("You need to sign up to our member system!");
}
?>

Alot easier.

additional
25-02-2007, 05:01 PM
Parse error: syntax error, unexpected T_ECHO in /home/rob4/public_html/community.php on line 5


Get this.

ZAG
25-02-2007, 05:02 PM
Read my post above.

Robbie
25-02-2007, 05:04 PM
EDITED


<?

ob_start();

include("config.php");

if($logged[username]} {

echo("<html>

<head>

<title></title>

<style type=\"text/css\">BODY{ color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#000000; scrollbar-base-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-face-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#FFFFFF; }

A{color:#000000; font-family:veranda; text-decoration:none; }

A:Visited{color:#000000; font-family:veranda; text-decoration:none; }

A:Hover{color:#0000FF; font-family:veranda; text-decoration:none; }</style>

</head>

<body bgcolor=\"#fefefe\">

<div align=\"center\"><font face=\"Verdana\"><strong>

<p align=\"center\">

<img title=\"\" height=\"66\" alt=\"\" src=\"/images/habbo1.PNG\" width=\"518\"></p></strong></font></div>

<div align=\"center\"><strong>&nbsp;</strong></div><font face=\"Courier\">

<div align=\"center\">

<table style=\"width: 210px; border-collapse: collapse; height: 256px;\" bordercolor=\"#000000\" height=\"256\" cellspacing=\"0\" cellpadding=\"3\" width=\"210\" border=\"0\">

<tbody>

<tr>

<td valign=\"top\" width=\"50&#37;\">

<p align=\"right\">

<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide12.gif\" width=\"51\"></p></td>

<td valign=\"top\" width=\"50%\">

<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>

<div><font face=\"Verdana\" size=\"1\"><a href=\"jobs.php\" target=\"content\">Jobs</a></font></div></td></tr>

<tr>

<td valign=\"top\" width=\"50%\">

<p align=\"right\">

<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide13.gif\" width=\"51\"></p></td>

<td valign=\"top\" width=\"50%\">

<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>

<div><font face=\"Verdana\" size=\"1\"><a href=\"about.php\" target=\"content\">About Us</a></font></div></td></tr>

<tr>

<td valign=\"top\" width=\"50%\">

<p align=\"right\">

<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide14.gif\" width=\"51\"></p></td>

<td valign=\"top\" width=\"50%\">

<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>

<div><font face=\"Verdana\" size=\"1\"><a href=\"staff.php\" target=\"content\">Staff</a></font></div></td></tr>

<tr>

<td valign=\"top\" width=\"50%\">

<p align=\"right\">

<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide15.gif\" width=\"51\"></p></td>

<td valign=\"top\" width=\"50%\">

<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>

<div><font face=\"Verdana\" size=\"1\"><a href=\"comps.php\" target=\"content\">Competitions</a></font></div></td></tr>

<tr>

<td valign=\"top\" width=\"50%\">

<p align=\"right\">

<img title=\"\" height=\"44\" alt=\"\" src=\"/images/guide16.gif\" width=\"51\"></p></td>

<td valign=\"top\" width=\"50%\">

<div><font face=\"Verdana\" size=\"1\">&nbsp;</font></div>

<div><font face=\"Verdana\" size=\"1\"><a href=\"events.php\" target=\"content\">Events</a></font></div></td></tr></tbody></table></div>

<div align=\"center\">&nbsp;</div>

<div align=\"center\"><font face=\"Verdana\" color=\"#000000\" size=\"1\"><a href=\"/staffloginpage.php\" target=\"content\">Staff login</a></font></div></font>

<div align=\"center\"><font face=\"Verdana\">&nbsp;</font></div>

<div align=\"center\"><strong><font face=\"Verdana\">&nbsp;</font></strong></div>

<div align=\"center\"><font face=\"Verdana\">&nbsp;</font></div>

</body>

</html>");

}

else

{

echo("Not logged in");

}

?>

additional
25-02-2007, 05:05 PM
Read my post above.

Tried yours, it worked. Thanks mate. Care to explain what you did so I can do it to the rest of my pages?

+ rep to all who tried.

ZAG
25-02-2007, 05:09 PM
I got rid of the echo tags and closed the php tags then reopened them.

Eg.

From:


<?php
if($_SESSION['hello']){
echo '<b>Hello</b>';
}
?>


To:


<?php
if($_SESSION['hello']{
?>
<b>Hello</b>
<?php
}
?>

additional
25-02-2007, 05:15 PM
I understand now. Thanks!

ZAG
25-02-2007, 05:17 PM
try



<?
ob_start();
include("config.php");
if (isset($logged[username]))
{
?>
<head>
<title></title>
</head>
<body bgcolor="#FEFEFE">
<form action="mail.php" method="post">
<div align="center"><font face="Verdana" size="1">Habbo Name </font>
<input type="text" value="" name="name"></div>
<div align="center">
<br><font face="Verdana" size="1">Email addess </font>
<input type="text" value="" name="email"></div>
<div align="center">
<br><font face="Verdana" size="1">Message
<br></font><textarea name="message" rows="5" cols="40">&nbsp;</textarea>
<br></div>
<div align="center">
<input type="submit" value="Send Email">
<br></div>
<div align="center"><font face="Verdana" size="1">Your I.P has been logged for saftey reasons.
<br></font></form>
</body>
</html>
<?php
}
else
{
echo("You need to sign up to our member system!");
}
?>

additional
25-02-2007, 05:21 PM
Was doing it to the wrong page lol. I understand.

Thanks mate.

PixelWill
25-02-2007, 07:54 PM
Th0ma4s,

It doesn't matter what way it is, does it? :S

I didn't think it did.

Voldemort
26-02-2007, 01:59 AM
try



<?
ob_start();
include("config.php");
if (isset($logged[username]))
{
?>
<head>
<title></title>
</head>
<body bgcolor="#FEFEFE">
<form action="mail.php" method="post">
<div align="center"><font face="Verdana" size="1">Habbo Name </font>
<input type="text" value="" name="name"></div>
<div align="center">
<br><font face="Verdana" size="1">Email addess </font>
<input type="text" value="" name="email"></div>
<div align="center">
<br><font face="Verdana" size="1">Message
<br></font><textarea name="message" rows="5" cols="40">&nbsp;</textarea>
<br></div>
<div align="center">
<input type="submit" value="Send Email">
<br></div>
<div align="center"><font face="Verdana" size="1">Your I.P has been logged for saftey reasons.
<br></font></form>
</body>
</html>
<?php
}
else
{
echo("You need to sign up to our member system!");
}
?>
if(isset()) will return true no matter what $logged[username] is set to...

Baving
26-02-2007, 05:52 PM
Or you could display the not logged in message first then exit..


<?
ob_start();
include('config.php');

if(!$logged['username']) {

die("You must be registered or logged in!");

}
?>
<head>
<title></title>
</head>
<body bgcolor="#FEFEFE">
<form action="mail.php" method="post">
<div align="center"><font face="Verdana" size="1">Habbo Name </font>
<input type="text" value="" name="name"></div>
<div align="center">
<br><font face="Verdana" size="1">Email addess </font>
<input type="text" value="" name="email"></div>
<div align="center">
<br><font face="Verdana" size="1">Message
<br></font><textarea name="message" rows="5" cols="40">&nbsp;</textarea>
<br></div>
<div align="center">
<input type="submit" value="Send Email">
<br></div>
<div align="center"><font face="Verdana" size="1">Your I.P has been logged for saftey reasons.
<br></font></form>
</body>
</html>

Recursion
26-02-2007, 07:45 PM
Bavings is how i do it...

Want to hide these adverts? Register an account for free!