|
Web design and Programming Discuss website creation and other programming topics. |
|
Thread Tools | Search this Thread | Display Modes |
#21
|
||
|
Getting
You do not have permission to access this page. Please login Below. Username: Password: Submit -- Reset You keep referring to code above... you talking about P's code or Elite's? |
#22
|
||
|
read the rest of the post
__________________
|
#23
|
||
|
Can I see your code please?
|
#24
|
||
|
mine? ... its the same as he gave me
Code:
<? function login_form() {?> <form method="post" action="<?Echo($_SERVER['PHP_SELF']);?>"> Username: <input type="text" name="username" /><br /> Password: <input type="password" name="password" /><br /> <input type="hidden" name="login" value="true" /> <input type="submit" name="login" value=" Login " /> <input type="reset" value=" Reset " /> </form> <?} If($_POST['login']) { $username=mysql_real_escape_string($_POST['username']); $password=mysql_real_escape_string($_POST['password']); $query=mysql_query("SELECT * FROM users WHERE username='".$username."' AND password='".$password."' LIMIT 1"); If(mysql_num_rows($query) > 0) { setcookie("loggedin","true",time+36000); //1 day sleep(1); } mysql_free_result($query); header("Location: ".$_SERVER['PHP_SELF']); exit; } If($_COOKIE['loggedin']!="true") { Echo(" You do not have permission to access this page. Please login Below. "); login_form(); // print the login form exit; }?>
__________________
|
#25
|
||
|
Try
PHP Code:
Last edited by DevilDog#1; 04-16-2005 at 12:09 AM. |
#26
|
||
|
got an error now .... the login boxes don't show
__________________
|
#27
|
||
|
Interesting ... Try now
PHP Code:
|
#28
|
||
|
when i try to login with the user and pass that i registered and it said was success full i get this
Code:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home2/kobra/public_html/unitedalliance/login.php on line 22 Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home2/kobra/public_html/unitedalliance/login.php on line 26 Warning: Cannot modify header information - headers already sent by (output started at /home2/kobra/public_html/unitedalliance/login.php:22) in /home2/kobra/public_html/unitedalliance/login.php on line 28
__________________
|
#29
|
||
|
Is your DB working ok?
Run this code ... you'll know if your DB is working. Save it as "mysql_connect.php" PHP Code:
Last edited by DevilDog#1; 04-16-2005 at 12:56 PM. |
#30
|
||
|
should i can run forums off it .. the user has all privlages ... umm
__________________
|
#31
|
||
|
and the forum is up? and you do posts and stuff?
|
#32
|
||
|
idk i just cleared everythign .. and made new a new database for this
__________________
|
#33
|
||
|
u know what guys...i'm liking ur code and all, but how can you tell if there logged in? all it does is check if they aren't logged in if i'm readding it correctly...
PHP Code:
c i would change the cookie to this to: PHP Code:
PHP Code:
PHP Code:
|
#34
|
||
|
Your MySQL server might be currupt. I know when i was using Lycos i had alot of trouble for nothing
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Php Nuke | General Nuisance | Web design and Programming | 5 | 11-21-2004 08:43 PM |
PHP Nuke :| | NaughtyPerry | Web design and Programming | 2 | 11-08-2004 04:15 PM |
How Do U Use Php Nuke? | Wilson1990 | Web design and Programming | 11 | 08-05-2004 08:29 PM |
PHP NUKE SKINS | XenoMorpH | Web design and Programming | 7 | 04-06-2003 06:34 AM |
PHP Nuke 6.0 Help | hodog | Web design and Programming | 3 | 10-17-2002 04:32 AM |