ID:               31390
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ricardomestre at oninetspeed dot pt
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: NT
 PHP Version:      Irrelevant
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.


Previous Comments:
------------------------------------------------------------------------

[2005-01-03 17:20:11] ricardomestre at oninetspeed dot pt

Description:
------------
Hello all, 
Im sorry if this thread is repeated or even if its not a bug, but i
searched a lot and no one could help me...

Here's the situation, i am trying to do a print page, and instead of
printing a page one by one, i thought it would be best to have all the
pages in one.

My code its pretty complex and specific so i made two simple pages with
similar sctructure to see what happens.

Reproduce code:
---------------
Page test.php

<?php
setcookie("loged","yes",time()+3600, '', '.domain.com'); ###this
setcookie its just to save time when testing, but it doesnt affect the
final result...
if($_COOKIE['loged'] == 'yes') {
        for($i = 1; $i <= 3; $i++) {
               include
'http://www.domain.com/database/code.php?page=1';
        }
}
?>


Page code.php

<?php
if($_COOKIE['loged'] == 'yes') {
print "You can see the code<br>";
} else {
print "You must login first<br>";
}
?>

Expected result:
----------------
I'd expect to see:

You can see the code
You can see the code
You can see the code

Because the cookie is set...

Actual result:
--------------
Page test.php
The cookie is set,
it checks it just to prove that its well set,
to include the page 3 times the 'for',
the include with full link because of the args.


Page code.php
Cookie test fails... $_COOKIE['loged'] returns nothing.

and so the final result is:

You must login first
You must login first
You must login first

final note: Accessing code.php directly works fine. With include
doesn't... :/


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31390&edit=1

Reply via email to