Here is some additional info:

My other PHP scripts execute just fine, including the php script init.php
which uses header(...) to dispatch to the member_login.htm page. Recall that
the problem arises when validate_member_login.php is invoked from
member_login.htm. When validate_member_login.php is invoked directly, it
executes properly.

I'm running the most recent production release of the Apache server on
winxp. My ISP is running the same version. I've configured PHP identically
with my ISP's Apache config. I use Dreamweaver MX for development and
testing. I've not tested for this problem on my ISP's system, yet

Once again, note that the php script, validate_member_login.php is executed
properly in one case, yet is displayed in the browser in the other. Here is
the code for validate_member_login.php:

<?php
include_once('../init.php');

/**
 * Variables set by member_login.htm are:
 *      username -- contains the username of the member.
 *      password -- contains the member's password.
 */
$username = trim($HTTP_POST_VARS['username']);
$password = trim($HTTP_POST_VARS['password']);

$result = authenticate_member_login( $username, $password );
if( $result == 0 ) {
     $HTTP_SESSION_VARS['session_id'] = crypt_password( $password );
     $HTTP_SESSION_VARS['username'] = $username;
     header( 'Location: '.MEMBER_HOME_PAGE );
} else {
     header( 'Location: '.MEMBER_LOGIN_PAGE );
}
?>

'init.php' executes session_start(), sets a bunch of constants (e.g.,
MEMBER_HOME_PAGE, etc.), sets an error handler, and includes a bunch of
libraries. All standard stuff.

Again, any help would be appreciated.

Cheers,

Michael

"Michael T. Peterson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> When a user first comes to my site, the user's session id is checked and
> validated. If no session id is present or the validation fails, the user
is
> vectored to a second page containing a login form.  When the user enters
the
> username and password and then clicks the submit button the info is
> forwarded to a third page, a php script, validate_member_login.php, that
> checks the username and password against a database.  Just for
completeness,
> note that the php script, validate_member_login.php, is invoked via login
> form's action parameter, i.e.,
>
>         <form action="validate_member_login.php" ... />
>
> The problem is that the php script, validate_member_login.php, is
displayed
> in the browser rather than being executed.
>
> This is my first attempt at designing a dynamic web site so I'm sure I've
> missed something really basic, but I have hardly any hair left to pull
out.
>
> Thanks, in advance,
>
> Michael
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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

Reply via email to