Hi,
Monday, July 12, 2004, 10:28:59 AM, you wrote:
MTP> Here is some additional info:
MTP> My other PHP scripts execute just fine, including the php script init.php
MTP> which uses header(...) to dispatch to the member_login.htm page. Recall that
MTP> the problem arises when validate_member_login.php is invoked from
MTP> member_login.htm. When validate_member_login.php is invoked directly, it
MTP> executes properly.
MTP> I'm running the most recent production release of the Apache server on
MTP> winxp. My ISP is running the same version. I've configured PHP identically
MTP> with my ISP's Apache config. I use Dreamweaver MX for development and
MTP> testing. I've not tested for this problem on my ISP's system, yet
MTP> Once again, note that the php script,
MTP> validate_member_login.php is executed
MTP> properly in one case, yet is displayed in the browser in the other. Here is
MTP> the code for validate_member_login.php:
MTP> <?php
MTP> include_once('../init.php');
MTP> /**
MTP> * Variables set by member_login.htm are:
MTP> * username -- contains the username of the member.
MTP> * password -- contains the member's password.
MTP> */
MTP> $username = trim($HTTP_POST_VARS['username']);
MTP> $password = trim($HTTP_POST_VARS['password']);
MTP> $result = authenticate_member_login( $username, $password );
MTP> if( $result == 0 ) {
MTP> $HTTP_SESSION_VARS['session_id'] = crypt_password( $password );
MTP> $HTTP_SESSION_VARS['username'] = $username;
MTP> header( 'Location: '.MEMBER_HOME_PAGE );
MTP> } else {
MTP> header( 'Location: '.MEMBER_LOGIN_PAGE );
MTP> }
?>>
MTP> 'init.php' executes session_start(), sets a bunch of constants (e.g.,
MTP> MEMBER_HOME_PAGE, etc.), sets an error handler, and includes a bunch of
MTP> libraries. All standard stuff.
MTP> Again, any help would be appreciated.
MTP> Cheers,
MTP> Michael
Sounds like you forgot the <?php in the include script
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php