Re: Include???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dan Shirah wrote:
Okay, I think I'm doing everything right, but for whatever reason my include
isn't working.

<?php
echo $_POST['status_code'];
if ($_POST['status_code'] = "C") {
 include ('complete_save.php');
}
?>

The echo of my status_code retruns the correct value so the if should
trigger.

This is my include page:

<?php

echo "test";

?>

VERY simple, but for some reason is not working????

I think to this point most have missed the actual problem.

imho, it has nothing to do with the following line.

if ( $_POST['status_code'] = "C")

my reason for saying this is this.  The preceding condition will always return true.

<?php

$a = 'a';
if ( $a = "C" ) {
	echo '$a test success';
}

$c = 'C';
if ( $c == "C" ) {
	echo '$c test success';
}

?>

This snippet should prove my point.

so, I would have to say that the problem is not with the condition, but rather the include file itself.

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Unknown

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux