Thank you for your attention, Kirk.
OK, I just don't know what kind of code I should post. My cookie does not loose it's value when all files (PHP and HTML) are in the same folder. The trick is that I call PHP function which is located in another folder than HTML which calls this function.
As for code, it looks like this in PHP file:
- this is where cookie is created: setcookie ("c_id", $id);
Then this PHP file opens HTML in another folder:
- ECHO '<SCRIPT language="JavaScript">
window.open("../user.htm", "_top");
</SCRIPT>';
In this user.htm I have code:
<FORM ACTION="php-bin\addproj.php3" METHOD=POST name="frmAddProj">
<?PHP
include ('php-bin\comboboxes.php3');
comboFunction();
?>
</FORM>
So, comboFunction is the function which is contained in comboboxes.PHP3 (in php-bin folder).
In this function I try to read cookie:
function comboFunction(){
global $c_id;
$id=$c_id;
And here I get id=''. It looses it's value once I change folder. If user.htm and comboboxes.PHP3 are in the same folder, it works fine. But I have to place them in different folders - PHP in php-bin, and HTM's - in the root folder.