NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Login system code

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 03-26-2006, 06:56 AM THREAD STARTER               #1 (permalink)
Senior Member
 
Xyzer's Avatar
Join Date: Aug 2005
Location: United Kindom
Posts: 1,502
Xyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to all
 


Tsunami Relief AIDS/HIV

Login system code


Hi Everyone,

I have made a login system for my site, this code seems to be wrong somewhere i have to put:
[code]
<?
ob_start();
include("config.php");
?>[/quote]
At the top of each page and i dont know where, ive been told it goes before any html etc. Is this correct?
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<? 
   ob_start(); 
   include("config.php"); 
?> 
<? 
include("online.php"); 
?> 
<html>
<head>
<style type="text/css">
<!--
a:link {
	color: 3E7B0B;
	text-decoration: none;
}
a:visited {
	color: 3E7B0B;
	text-decoration: none;
}
a:hover {
	font-weight: bold;
	color: 3E7B0B;
	text-decoration: underline;
}
-->
</style>
<title>X6 Core Reloaded [V1.1]</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="photoshop tutorials, tutorials, photoshop, adobe, adobe photoshop tutorials, online learning, tut, tutorials, html tutorials, windows tutorials, more tutorials" />
<meta name="description" content="Photoshop and other tutorials." />
<LINK REL="X6 Core" HREF="/images/favicon.ico">
</head>
<!-- DO NOT DELETE THE MARGIN TAGS, THESE STOP WHITE GAPS ON ALL EDGES OF THE PAGE -->



<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <!-- START OF GREEN HEADER -->
	<td background="images/headerbg.gif" height="112"><img src="images/logo.gif" width="379" height="113"></td>
	<td background="images/headerbg.gif" height="112">&nbsp;<a href="http://www.need-space.co.uk"<img src="/images/needspace.gif"</a></td>
  </tr>
  <!-- END OF GREEN HEADER -->
 <!-- START OF GREY HEADER BAR -->
  <tr>
    <td colspan="2" background="images/headerbar.gif" height="32"></td>
  </tr>
  <!-- END OF GREY HEADER BAR -->
   <!-- START OF MAIN CONTENT AREA -->
   <tr>
    <td colspan="2">&nbsp;<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top" width="220" <!-- START OF NAVIGATION --><table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="4%"><img src="images/lborder.gif" width="34" height="24"></td>
                <td width="90%" background="images/bgborder.gif"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Navigation</font></div></td>
                <td width="6%"><img src="images/rborder.gif" width="2" height="24"></td>
              </tr>
              <tr>
                <td colspan="3"><table width="191" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">
                    <tr>
                      <td> 
                        <!-- START OF CONTENT BOX CONTENT -->
                        <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td height="15" bgcolor="#EBEBEB"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>·</strong> 
                              <a href="?id=Home/News">Home</a></font></td>
                          </tr>
                          <tr> 
                            <td height="15"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>·</strong> 
                              <a href="?id=News Archive">News Archive</a></font></td>
                          </tr>
                           <tr> 
                            <td height="15" bgcolor="#EBEBEB"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>·</strong> 
                              <a href="?id=Downloads">Downloads</a></font></td>
                          </tr>
                          <tr> 
                            <td height="15"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>·</strong> 
                              <a href="?id=Affiliates">Affiliates</a></font></td>
                          </tr>
                          <tr> 
                            <td height="15" bgcolor="#EBEBEB"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>·</strong> 
                              <a href="?id=contact">Contact Me</a></font></td>
                          </tr>
						  <tr> 
                            <td height="15"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>·</strong> 
                              <a href="?id=submittutorial">Submit a tutorial</a></font></td>
                          </tr>
						  <tr> 
                            <td height="15" bgcolor="#EBEBEB"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>·</strong> 
                              <a href="?id=fun">Fun Page</a></font></td>
                          </tr>
						  <tr> 
                            <td height="15"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>·</strong> 
                              <a href="?id=showtutorials">View Tutorials</a></font></td>
                          </tr>
                        </table> 
                        <!-- END OF CONTENT BOX CONTENT -->
                      </td>
                    </tr>
                  </table></td>
              </tr>
            </table><!-- END OF NAVIGATION -->
			<br>
			<!-- START OF NAVIGATION --><table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="4%"><img src="images/lborder.gif" width="34" height="24"></td>
                <td width="90%" background="images/bgborder.gif"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Login</font></div></td>
                <td width="6%"><img src="images/rborder.gif" width="2" height="24"></td>
              </tr>
              <tr>
                <td colspan="3"><table width="96%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">
                    <tr>
                      <td> 
                        <!-- START OF CONTENT BOX CONTENT -->
						<center>
                        <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#009966">
			<? 
   include("login.php"); 
?> 
						</font> 
						</center>
                        <!-- END OF CONTENT BOX CONTENT -->
                      </td>
                    </tr>
  			</table></tr>
			<!-- END OF NAVIGATION -->
			<br>
			<!-- START OF NAVIGATION --><table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="4%"><img src="images/lborder.gif" width="34" height="24"></td>
                <td width="90%" background="images/bgborder.gif"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Catogories</font></div></td>
                <td width="6%"><img src="images/rborder.gif" width="2" height="24"></td>
              </tr>
              <tr><br>
                <td colspan="3"><table width="95.5%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">
                    <tr>
                      <td> 
                        <!-- START OF CONTENT BOX CONTENT -->
						<table>
                          <tr> 
                            <td height="15"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>·</strong> 
                              <a href="?id=photoshoptutorials">Photoshop Tutorials</a></font></td>
                          </tr>
						   <td height="15"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>·</strong> 
                              <a href="?id=htmltutorials">HTML Tutorials</a></font></td>
						  <tr> 
                            <td height="15"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>·</strong> 
                              <a href="?id=windowstutorials">Windows Tutorials</a></font></td>
                          </tr>
						  </table>
                        <!-- END OF CONTENT BOX CONTENT -->
                      </td>
                    </tr>
                  </table></td>
              </tr>
			 
            </table><!-- END OF NAVIGATION --></td>
    <td width="100%" valign="top">  <!--MAIN CENTER CONTENT AREA START-->
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td><img src="images/lborder.gif" width="34" height="24"></td>
                <td width="100%" background="images/bgborder.gif"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Content</font></div></td>
                <td><img src="images/rborder.gif" width="2" height="24"></td>
              </tr>
              <tr> 
                <td colspan="3"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">
                    <tr> 
                      <td> <div align="center"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
					  <?php

switch($_GET['id']) {

case "Home/News":
include('main.php');
break;

case "News Archive":
include('oldnews.php');
break;

case "Downloads":
include('downloads.php');
break;

case "Affiliates":
include('Affiliates.php');
break;

case "contact":
include('contact.php');
break;

case "tut2":
include('linestut.php');
break;

case "tut1":
include('Signature1.php');
break;

case "photoshoptutorials":
include('photoshop.php');
break;

case "html":
include('html.php');
break;

case "windows":
include('windows.php');
break;

case "submittutorial":
include('collect_data.php');
break;

case "fun":
include('fun.php');
break;

case "processdata":
include('process_data.php');
break;

case "showtutorials":
include('display_data.php');
break;

case "register":
include('register.php');
break;

case "Messages":
include('messages.php');
break;

case "members":
include('members.php');
break;

case "editprofile":
include('editprofile.php');
break;

default:
include('main.php');
break;


}

?>

</font> 
                        </div></td>
                    </tr>
                    <tr>
                      <td bgcolor="#E8E8E8"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Copyright 
                          2006 - X6 Core.com - All Rights Reserved </font></div></td>
                    </tr>
                  </table></td>
              </tr>
            </table>
            <!--MAIN CENTER CONTENT AREA END--></td>
    <td width="220" valign="top"><!-- START OF NAVIGATION --><table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="4%"><img src="images/lborder.gif" width="34" height="24"></td>
                <td width="90%" background="images/bgborder.gif"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Our Tutorials</font></div></td>
                <td width="6%"><img src="images/rborder.gif" width="2" height="24"></td>
              </tr>
              <tr>
                <td colspan="3"><table width="96%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">
                    <tr>
                      <td> 
                        <!-- START OF CONTENT BOX CONTENT -->
                        <font size="1" face="Verdana, Arial, Helvetica, sans-serif">
						<a href="?id=tut1">Cool Signature Tutorial</a><br>
						<a href="?id=tut2">Lines Tutorial</a></font> 
                        <!-- END OF CONTENT BOX CONTENT -->
                      </td>
                    </tr>
                  </table></td>
              </tr>
            </table><!-- END OF NAVIGATION -->
			<br>
			<!-- START OF NAVIGATION --><table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="4%"><img src="images/lborder.gif" width="34" height="24"></td>
                <td width="90%" background="images/bgborder.gif"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Users Online</font></div></td>
                <td width="6%"><img src="images/rborder.gif" width="2" height="24"></td>
              </tr>
              <tr>
                <td colspan="3"><table width="96%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">
                    <tr>
                      <td> 
                        <!-- START OF CONTENT BOX CONTENT -->
                        <font size="1" face="Verdana, Arial, Helvetica, sans-serif">
						<? 
include("config.php"); 
$offline = 300;  // 5 minutes 
$current = time(); //gets the current time 
$offline = ($current-$offline); //the cutoff time for being considered online 
$getusers = mysql_query("SELECT * from users where online >= '$offline'"); 
//gets the users that are online 
while ($users = mysql_fetch_array($getusers)) 
{ 
echo ("$users[username], "); 
//displays the online users 
} 
?> </font> 
                        <!-- END OF CONTENT BOX CONTENT -->
                      </td>
                    </tr>
                  </table></td>
              </tr>
            </table><!-- END OF NAVIGATION -->
			<br>
			<!-- START OF NAVIGATION --><table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="4%"><img src="images/lborder.gif" width="34" height="24"></td>
                <td width="90%" background="images/bgborder.gif"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Affiliates</font></div></td>
                <td width="6%"><img src="images/rborder.gif" width="2" height="24"></td>
              </tr>
              <tr>
                <td colspan="3"><table width="96%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">
                    <tr>
                      <td> 
                        <!-- START OF CONTENT BOX CONTENT -->
                        <font size="1" face="Verdana, Arial, Helvetica, sans-serif">
						<a href="http://www.greycobra.com">Grey Cobra - Great tutorials and brushes</a><br>
						<a href="http://www.good-tutorials.com">Good Tutorials over 9000 Tutorials.</a>
						</font> 
                        <!-- END OF CONTENT BOX CONTENT -->
                      </td>
                    </tr>
                  </table></td>
              </tr>
            </table><!-- END OF NAVIGATION --></td>
  </tr>
</table>
</td>
  </tr>
  <!-- END OF MAIN CONTENT AREA -->
</table>
And also if you check www.x6core.com, register and then login i get a little error (in the image) but dont know what to change.

Thanks all the code is above.
Attached Images
File Type: gif Untitled-1.gif (3.7 KB, 8 views)
Xyzer is offline  
Old 03-26-2006, 07:28 AM   #2 (permalink)
NamePros Regular
 
Noobie's Avatar
Join Date: Feb 2006
Location: Montreal, Quebec, Canada
Posts: 324
Noobie is on a distinguished road
 



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> is html, try removing it
__________________
Goldkey.com is a scam
What's your BMI? | Timestamp Generator
Noobie is offline  
Old 03-26-2006, 07:42 AM THREAD STARTER               #3 (permalink)
Senior Member
 
Xyzer's Avatar
Join Date: Aug 2005
Location: United Kindom
Posts: 1,502
Xyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to all
 


Tsunami Relief AIDS/HIV
is that anything to do with the image?
Xyzer is offline  
Old 03-26-2006, 12:11 PM THREAD STARTER               #4 (permalink)
Senior Member
 
Xyzer's Avatar
Join Date: Aug 2005
Location: United Kindom
Posts: 1,502
Xyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to all
 


Tsunami Relief AIDS/HIV
sorry to be annoying but i also am having alignment problems with the boxes and sorry to bump this is urgemnt.
Xyzer is offline  
Old 03-26-2006, 02:55 PM   #5 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
PHP Code:
<?
ob_start
();
include(
"config.php");
include(
"online.php");
????: NamePros.com http://www.namepros.com/programming/180678-login-system-code.html
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
Eric is offline  
Old 03-26-2006, 03:02 PM   #6 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
as secondversion points out move the doctype line to below the following:-

PHP Code:
<? 
   ob_start
(); 
   include(
"config.php"); 
????: NamePros.com http://www.namepros.com/showthread.php?t=180678
?>
Last edited by filth@flexiwebhost; 03-26-2006 at 03:07 PM.
Peter is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 05:43 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger