خرید بک لینک
I am new to PHP and am experimenting with includes now.

Is there a reason why my include statement does not display variables declared on the primary page? To help force the variables, I thought I would use session variables, but that is not working either. Note: Both pages do immediately start with session_start();

As shown below, both the $_SESSION variable and the PHP variable are showing as blank. Is there a reason for this?

Main page:
PHP Code:

$navMenu1 "Tomb of Aihilation";
$_SESSION['navmenu1'] = $navMenu1

Includes page:
PHP Code:

<?php
    session_start
();
    echo 
"sess: " $_SESSION['navmenu1'] . "php: " $navMenu1;
?>

برچسب: نویسنده: آیلین رضوانی تاريخ: دوشنبه 27 آذر 1396 ساعت: 7:55

صفحه بندی