Re: Include???
| From: | Jim Lucas | Date: | Wed, 23 May 2007 15:42:26 +0000 |
| Subject: | Re: Include??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255415@lists.php.net to get a copy of this message | ||
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