Welcome, Guest. Please Login or Register.
July 27, 2025, 07:09:15 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  English User Help  |  English Help  |  user login system for other pages too « previous next »
Pages: 1 [2] Reply Ignore Print
Author Topic: user login system for other pages too  (Read 2157 times)
koelkast
Noobie
*
Posts: 12


I'm a llama!

Re:user login system for other pages too
« Reply #15 on: August 26, 2003, 06:30:11 PM »
Reply with quote

there is no lib.php in my forum directory, nor in sources or packages or somewhere else...
Logged
Douglas
aka The Bear
Support Team
YaBB God
*****
Posts: 1050


Bears rule! Llamas rule too!

WWW
Re:user login system for other pages too
« Reply #16 on: August 26, 2003, 06:38:50 PM »
Reply with quote

QuoteJust the basics for you to start with.  I have that set in a lib.php file.
As I said, it's just the basics for you to start with.  You need to physically create a lib.php file.  IF you are new to PHP Development, I STRONGLY suggest that you spend some time at www.hotscripts.com downloading some of the simple PHP scripts they have there, and studying them, and spend some time in the PHP Scripting forum here, or hire someone to do this for you.
« Last Edit: August 26, 2003, 06:39:49 PM by Douglas » Logged

Need help? Please SEARCH first.  No need for a bad attitude, we like helping positive minded people.
ComeHit.us Short URL  redirection svcs with YSE powered forums, COMING SOON!
Want to say thanks?  Check out http://comehit.us/?u=3
koelkast
Noobie
*
Posts: 12


I'm a llama!

Re:user login system for other pages too
« Reply #17 on: August 26, 2003, 06:47:49 PM »
Reply with quote

QuoteWell, do you have that set up in your lib.php file?

In this sentence you suggest that there already ís a lib.php so I didn't understand what you were talking about.
AND it doesn't change anything if I name the file lib.php or huh.php or njet.php  ::)
« Last Edit: August 26, 2003, 06:50:44 PM by koelkast » Logged
koelkast
Noobie
*
Posts: 12


I'm a llama!

Re:user login system for other pages too
« Reply #18 on: August 26, 2003, 08:06:31 PM »
Reply with quote

I tried a few things again and yet it seems to work a little:

I get this warning, I don't understand why the mysql_fetch_array is not valid?
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in lib.php on line 13

When I use a new header I get this message, although there is nothing on line 13 that seems to send a header:
Warning: Cannot modify header information - headers already sent by (output started at lib.php:13) in lib.php on line 21
When I use echo instead this error dissappears but I still have that other error message  :(
Logged
Douglas
aka The Bear
Support Team
YaBB God
*****
Posts: 1050


Bears rule! Llamas rule too!

WWW
Re:user login system for other pages too
« Reply #19 on: August 26, 2003, 08:27:35 PM »
Reply with quote

Please paste the contents of your file here.
Logged

Need help? Please SEARCH first.  No need for a bad attitude, we like helping positive minded people.
ComeHit.us Short URL  redirection svcs with YSE powered forums, COMING SOON!
Want to say thanks?  Check out http://comehit.us/?u=3
koelkast
Noobie
*
Posts: 12


I'm a llama!

Re:user login system for other pages too
« Reply #20 on: August 27, 2003, 02:14:49 PM »
Reply with quote

<?PHP
require('SSI.php');  
$DB[hostname] = "localhost";
$DB[username] = "user";
$DB[password] = "pwd";
$DB[dbname] = "database";
$connection = mysql_connect ($DB[hostname], $DB[username], $DB[password]) or die ("Could not connect to the server.  The following error has occurred <b>" . mysql_error() . "</b>");
$db = mysql_select_db ($DB[dbname]);

global $username, $ID_MEMBER;
if ($username == "Guest") { LogIn(); exit(); }
$query = mysql_query("select emailAddress, memberGroup from yse_members where ID_MEMBER = '$ID_MEMBER'");
$result = mysql_fetch_array ($query); list ($email, $group) = $result;
if ($group == "Banned") { echo "We're sorry, but this account has been disabled.&nbsp; If you feel that this is an error, please contact <a href=\"mailto:webmaster@mydomain?subject=Account Turned off for $user[name]\">Douglas</a>.&nbsp; Thank you. :)"; exit(); }
if (($group == "Administrator") || ($group == "Global Moderator") || ($group == "Moderator")) { header("Location: good.php");
exit; }

else

{
header("Location: bad.php");
exit;
}

?>
Logged
Pages: 1 [2] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  user login system for other pages too « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.363 seconds with 20 queries.