Hi,

On Wed, 24 Mar 2004 23:59:30 -0500
[EMAIL PROTECTED] (Andy B) wrote:

> hi...
> 
> still having login problems..
> i tried just about everything i can think of to get this to
> work but for some strange reason it keeps getting stuck...

What do mean by "keeps getting stuck"? Where? What? Any error
messages?

> [code]
> <?
> session_start();
> include("libs/conf.db");
> 
> mysql_connect($host, $mysqluser, $mysqlpwd);
> $result=mysql_query("select * from rnjresort.users where
> username='$username' and pwd=md5('$password')");

Where's $username coming from? $_GET? $_POST? Check the
manual/archives for more info...

> if(mysql_num_rows($result)==0) {
> echo "<h1>Login failed</h1>";
> header("location: login.html"); }
> else {
> $_SESSION[username]=$username;
> header("location: deletepost.php"); }
> ?>
> [/code]

Use an absolute URL for header("Location ...

And, your "echo" shouldn't come before your "header". Again, you
can check the manual/archives for more info...

And, maybe there's something else, I didn't really check
everything :)

--

- E -

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to