#register variable
session_registe r("product1") ;
session_registe r("product2") ;
$product1="Palm pilot";
$product2="Powe r mac 5";
#print variable from another page
print "Your chosen products are:\n\n";
print "<ul><li>$produ ct1\n<li>$produ ct2\n</ul>\n";
why the above code return
Your chosen products are:
Notice: Undefined variable: product1 in C:\Program Files\Apache
Group\Apache2\h tdocs\session\s ession3.php on line 11
Notice: Undefined variable: product2 in C:\Program Files\Apache
Group\Apache2\h tdocs\session\s ession3.php on line 11
session_registe r("product1") ;
session_registe r("product2") ;
$product1="Palm pilot";
$product2="Powe r mac 5";
#print variable from another page
print "Your chosen products are:\n\n";
print "<ul><li>$produ ct1\n<li>$produ ct2\n</ul>\n";
why the above code return
Your chosen products are:
Notice: Undefined variable: product1 in C:\Program Files\Apache
Group\Apache2\h tdocs\session\s ession3.php on line 11
Notice: Undefined variable: product2 in C:\Program Files\Apache
Group\Apache2\h tdocs\session\s ession3.php on line 11
Comment