Page 1 of 1

Basic password system

Posted: Tue May 28, 2002 2:30 pm
by Va55ag0
Hi, dumbass noob here.
I have a (very) basic single-user password system here. Which uses:

<? if($pass == "password") { include("correctpasspage.php");}
else { include("nono.php"); }
?>

and i would like to do the same, except with multiple users.

Any advice on how to implement such a system.

ps - i'm talking a few - like 10 - users, not 1000's :)
pps - ive read about using a mysql database to store the variables, but have so far been unable to extract them correctly. any advice on this also appreciated.

cheers Va55ag0.

Posted: Tue May 28, 2002 2:35 pm
by gotDNS
I use a mySQL database, here is my code...

The page it is passed from:

Code: Select all

<?php
session_start();

mysql_connect("localhost:3306", "techy") && mysql_select_db("forum")
or $failed = "Could not connect to database.";

$loginform = "<form method="post" action="login.php">
<img src="forumtop.gif" /><br />&nbsp;<b><u>Login</u></b><br />
&nbsp;Username: <input type="text" size="16" maxlength="16" name="username" />
 Password: <input type="password" size="16" maxlength="16" name="password" />
<input type="hidden" name="login" value="true" />
<input type="submit" value="Login" />
</form>";

echo "<html><head>
<title>Techy Board</title>
<link rel="stylesheet" type="text/css" href="forum.css" />
</head>
<body marginheight="0" marginwith="0" topmargin="0" leftmargin="0">";

if(session_is_registered("loggedin"))
&#123;
        echo "<img src="forumtop.gif" /><br />&nbsp;<b>You are logged in as $loggedin</b> : <a href="logout.php" class="NLINK">Logout</a><br /><br />";
&#125;
else
&#123;
        echo $loginform;
&#125;
?>

<br />
<table cellpadding="0" cellspacing="0" width="92%" border="0" align="center">
<tr>
<td colspan="2"><a href="index.php" class="NLINK">Techy Home</a></td>
</tr>
<tr>
<td width="20"></td>
<td>
<?php
if(session_is_registered("loggedin"))
&#123;
	echo "<a href="editup.php" class="NLINK">Edit User Profile</a><br />";
&#125;
else
&#123;
	echo "<a href="signup.php" class="NLINK">Sign-Up to post</a> (free)<br />";
&#125;
?>
<br /><b>NOTE: Remember, keep the language clean. Please no spamming. The cleaner the forum, the less the restrictions. Thanks. -Admin</b>
</td>
</tr>
</table>
<br /><br />
<table cellpadding="0" cellspacing="0" align="center" width="85%" class="TBL">
<tr>
<td bgcolor="#000000" height="12" align="center" colspan="3"><strong class="HEADER">Forums</strong></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="general"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) &#123;
	echo $row&#1111;"count(1)"];
&#125; if($row&#1111;"count(1)"] == "1") &#123; echo " post"; &#125; else &#123; echo " posts"; &#125; ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="genforum.php" class="NLINK">General Conversation</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="computers"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) &#123;
	echo $row&#1111;"count(1)"];
&#125; if($row&#1111;"count(1)"] == "1") &#123; echo " post"; &#125; else &#123; echo " posts"; &#125; ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="compforum.php" class="NLINK">Computers</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="games"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) &#123;
	echo $row&#1111;"count(1)"];
&#125; if($row&#1111;"count(1)"] == "1") &#123; echo " post"; &#125; else &#123; echo " posts"; &#125; ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="gameforum.php" class="NLINK">Computer Games</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="web"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) &#123;
	echo $row&#1111;"count(1)"];
&#125; if($row&#1111;"count(1)"] == "1") &#123; echo " post"; &#125; else &#123; echo " posts"; &#125; ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="webforum.php" class="NLINK">Web Design</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="ut"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) &#123;
	echo $row&#1111;"count(1)"];
&#125; if($row&#1111;"count(1)"] == "1") &#123; echo " post"; &#125; else &#123; echo " posts"; &#125; ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="utforum.php" class="NLINK">Unreal Tournament</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="prog"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) &#123;
	echo $row&#1111;"count(1)"];
&#125; if($row&#1111;"count(1)"] == "1") &#123; echo " post"; &#125; else &#123; echo " posts"; &#125; ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="progforum.php" class="NLINK">Programming</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="music"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) &#123;
	echo $row&#1111;"count(1)"];
&#125; if($row&#1111;"count(1)"] == "1") &#123; echo " post"; &#125; else &#123; echo " posts"; &#125; ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="musicforum.php" class="NLINK">Music</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="weird"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) &#123;
	echo $row&#1111;"count(1)"];
&#125; if($row&#1111;"count(1)"] == "1") &#123; echo " post"; &#125; else &#123; echo " posts"; &#125; ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="weirdforum.php" class="NLINK">Weird Stuff</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="soft"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) &#123;
	echo $row&#1111;"count(1)"];
&#125; if($row&#1111;"count(1)"] == "1") &#123; echo " post"; &#125; else &#123; echo " posts"; &#125; ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="softforum.php" class="NLINK">Computer Software</a></td>
</tr>
</table>
</body>
</html>
The login page:

Code: Select all

<?php
session_start();

mysql_connect("localhost:3306", "techy") && mysql_select_db("forum")
or $failed = "Could not connect to database.";

$result = mysql_query("select * from usrinfo where username="$username"");

$loginform = "<form method="post" action="login.php">
<img src="forumtop.gif" /><br />&nbsp;<b><u>Login</u></b><br />
&nbsp;Username: <input type="text" size="16" maxlength="16" name="username" />
 Password: <input type="password" size="16" maxlength="16" name="password" />
<input type="hidden" name="login" value="true" />
<input type="submit" value="submit" />
</form>";

$loginform2 = "<form method="post" action="login.php">
<img src="forumtop.gif" /><br />&nbsp;<b>ERROR: Username or password incorrect.</b><br /><br />&nbsp;<b><u>Login</u></b><br />
&nbsp;Username: <input type="text" size="16" maxlength="16" name="username" />
 Password: <input type="password" size="16" maxlength="16" name="password" />
<input type="hidden" name="login" value="true" />
<input type="submit" value="submit" />
</form>";

echo "<html><head>
<title>Techy Board</title>
<link rel="stylesheet" type="text/css" href="forum.css" />
</head>
<body marginheight="0" marginwith="0" topmargin="0" leftmargin="0">";

$row = mysql_fetch_assoc($result);

if($row&#1111;"password"]==md5($password))
{
        $loggedin=$username;
        session_register("loggedin");
        if($params&#1111;"prevurl"])
                header("Location: $prevurl");
        else
                echo "<img src="forumtop.gif" /><br />&nbsp;<b>You are logged in as $loggedin</b> : <a href="logout.php" class="NLINK">Logout</a><br /><br />";
}
else
{
        echo $loginform2;
}
?>
<br />
<table cellpadding="0" cellspacing="0" width="92%" border="0" align="center">
<tr>
<td colspan="2"><a href="index.php" class="NLINK">Techy Home</a></td>
</tr>
<tr>
<td width="20"></td>
<td>
<?php
if(session_is_registered("loggedin"))
{
	echo "<a href="editup.php" class="NLINK">Edit User Profile</a><br />";
}
?>
<br /><b>NOTE: Remember, keep the language clean. Please no spamming. The cleaner the forum, the less the restrictions. Thanks. -Admin</b>
</td>
</tr>
</table>
<br /><br />
<table cellpadding="0" cellspacing="0" align="center" width="85%" class="TBL">
<tr>
<td bgcolor="#000000" height="12" align="center" colspan="3"><strong class="HEADER">Forums</strong></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="general"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="genforum.php" class="NLINK">General Conversation</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="computers"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="compforum.php" class="NLINK">Computers</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="games"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="gameforum.php" class="NLINK">Computer Games</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="web"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="webforum.php" class="NLINK">Web Design</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="ut"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="utforum.php" class="NLINK">Unreal Tournament</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="prog"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="progforum.php" class="NLINK">Programming</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="music"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="musicforum.php" class="NLINK">Music</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="weird"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="weirdforum.php" class="NLINK">Weird Stuff</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="soft"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="softforum.php" class="NLINK">Computer Software</a></td>
</tr>
</table>
</body>
</html>
The logout page:

Code: Select all

<?php
session_start();

mysql_connect("localhost:3306", "techy") && mysql_select_db("forum")
or $failed = "Could not connect to database.";

$loginform = "<form method="post" action="login.php">
<img src="forumtop.gif" /><br />&nbsp;<b><u>Login</u></b><br />
&nbsp;Username: <input type="text" size="16" maxlength="16" name="username" />
 Password: <input type="password" size="16" maxlength="16" name="password" />
<input type="hidden" name="login" value="true" />
<input type="submit" value="Login" />
</form>";

$loginform2 = "<form method="post" action="login.php">
<img src="forumtop.gif" /><br />&nbsp;<b class="RED"><i>X</i></b> <b>You have been logged out.</b><br /><br />&nbsp;<b><u>Login</u></b><br />
&nbsp;Username: <input type="text" size="16" maxlength="16" name="username" />
 Password: <input type="password" size="16" maxlength="16" name="password" />
<input type="hidden" name="login" value="true" />
<input type="submit" value="Login" />
</form>";

$loginform3 = "<form method="post" action="login.php">
<img src="forumtop.gif" /><br />&nbsp;<b>ERROR: You can not logout unless you are logged in.<img src="smile.gif" /></b><br /><br />&nbsp;<b><u>Login</u></b><br />
&nbsp;Username: <input type="text" size="16" maxlength="16" name="username" />
 Password: <input type="password" size="16" maxlength="16" name="password" />
<input type="hidden" name="login" value="true" />
<input type="submit" value="Login" />
</form>";

echo "<html><head>
<title>Techy Board</title>
<link rel="stylesheet" type="text/css" href="forum.css" />
</head>
<body marginheight="0" marginwith="0" topmargin="0" leftmargin="0">";

if(session_is_registered("loggedin"))
{
        session_unregister("loggedin");
        echo $loginform2;
}
else
{
	echo $loginform3;
}
?>

<br />
<table cellpadding="0" cellspacing="0" width="92%" border="0" align="center">
<tr>
<td colspan="2"><a href="index.php" class="NLINK">Techy Home</a></td>
</tr>
<tr>
<td width="20"></td>
<td><br /><b>NOTE: Remember, keep the language clean. Please no spamming. The cleaner the forum, the less the restrictions. Thanks. -Admin</b>
</td>
</tr>
</table>
<br /><br />
<table cellpadding="0" cellspacing="0" align="center" width="85%" class="TBL">
<tr>
<td bgcolor="#000000" height="12" align="center" colspan="3"><strong class="HEADER">Forums</strong></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="general"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="genforum.php" class="NLINK">General Conversation</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="computers"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="compforum.php" class="NLINK">Computers</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="games"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="gameforum.php" class="NLINK">Computer Games</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="web"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="webforum.php" class="NLINK">Web Design</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="ut"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="utforum.php" class="NLINK">Unreal Tournament</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="prog"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="progforum.php" class="NLINK">Programming</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="music"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="musicforum.php" class="NLINK">Music</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="weird"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="weirdforum.php" class="NLINK">Weird Stuff</a></td>
</tr>
<tr>
<td width="65" height="30" class="NAME2" align="center">
<?php $listquery = "select count(1) from forum where forumname="soft"";
$listresult = mysql_query($listquery);
while ($row = mysql_fetch_assoc($listresult)) {
	echo $row&#1111;"count(1)"];
} if($row&#1111;"count(1)"] == "1") { echo " post"; } else { echo " posts"; } ?></td>
<td width="8" height="30" bgcolor="#DDDDDD" class="FORLIST">&nbsp;</td>
<td width="*" height="30" bgcolor="#DDDDDD" class="FORLIST"><a href="softforum.php" class="NLINK">Computer Software</a></td>
</tr>
</table>
</body>
</html>
Sorry if it is a lot, Ctrl+A is fast.

thanks

Posted: Wed May 29, 2002 4:41 am
by Va55ag0
thanks, i'll have some fun with that :)

quickie

Posted: Wed May 29, 2002 4:45 am
by Va55ag0
dont suppose you could tell me how ur database is set out?

sure...

Posted: Wed May 29, 2002 7:17 am
by gotDNS
sure, In a mySQL database I have a table called 'techy' in which i have a column for username, hashed password, signature, e-mail, and any other info that you might want to know about the user. When they sign up, it just adds it all to the table and retrieves it when necissary?

If I didn't answer your question, tell me.