954,219 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

php help needed for login

i cant get a login script to work so imma take the easy way out and ask if ne1 will give me one plzplzplzplzplz

:cry:

browny87us
Newbie Poster
1 post since Aug 2004
Reputation Points: 10
Solved Threads: 0
 

tell us what the problem is and post some code and we can probably help

Ragnarok
Junior Poster in Training
94 posts since Mar 2004
Reputation Points: 10
Solved Threads: 0
 

I highly recommend the free version of Cookie Password Protection . I use it on my site to protect certain database interfaces I don't want people getting into.

pcarlow
Newbie Poster
22 posts since Jun 2004
Reputation Points: 10
Solved Threads: 0
 

hey, if u find someone that knows how to do login php script, email me. my friend is setting up an rpg. having a login screen would be kool where he would not have to put u in himself. when putting in the login name, i would like to go straight to my member stats kinda like yahoo for the mail accont.

ill post the site when i talk to him next.

if anyone else can help me and him out, email me and ill give him ur email address and he'll email u about his site.

dragonkingamn
Newbie Poster
3 posts since Aug 2004
Reputation Points: 10
Solved Threads: 0
 

How about using PHP sessions like this:
<?php

if (!isset($PHP_AUTH_USER) || !isset($PHP_AUTH_PW)) {
//If the PHP session variables aren't set, ask for name and password
header('WWW-Authenticate: Basic realm="Authorized Users Only"');
header('HTTP/1.0 401 Unauthorized');
exit;

} else if (isset($PHP_AUTH_USER) && isset($PHP_AUTH_PW)) {

//If the variables are set, check the username and password against a //database.

$conn = pg_Connect("host=localhost dbname=[dbname] port=[portnumber]");

$result = pg_Exec($conn,
"SELECT *
FROM [table]
WHERE username='$PHP_AUTH_USER' AND
password='$PHP_AUTH_PW';");

$num = pg_NumRows($result);
$i = 0;

//If the user is authenticated against the database, echo the html code for //the page you want them to see

if ($num != 0) {
echo " ......

AK47
Newbie Poster
12 posts since Aug 2004
Reputation Points: 10
Solved Threads: 0
 

i cant get a login script to work so imma take the easy way out and ask if ne1 will give me one plzplzplzplzplz

:cry:

For starters you need to give more information...do you have mysql databases, do you even have php?

YoungCoder
Junior Poster
193 posts since Aug 2004
Reputation Points: 13
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You