hi every one

how can i control session to create svg tools

i have writen the following simple code but it dos not work

first file :

<?php

header("Content-type: image/svg+xml");
session_start();
print('<?xml version="1.0" encoding="iso-8859-1"?>');
?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/SVG/DTD/svg10.dtd">
  <svg width="500" height="500" viewBox="0 0 500 500">
<?php

 $HTTP_SESSION_VARS['ses_vars']="hello world";
 ?>
 <a xlink:href="zz.php"><text x="50" y="50">next</text></a>
</svg>

second file

<?php

header("Content-type: image/svg+xml");
 session_start();
print('<?xml version="1.0" encoding="iso-8859-1"?>');
?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/SVG/DTD/svg10.dtd">
  <svg width="500" height="500" viewBox="0 0 500 500">
<?php

 echo ($HTTP_SESSION_VARS['ses_vars']);
 ?>
 <a xlink:href="zzz.php"><text x="50" y="50">next</text></a>
</svg>

    not exactly sure how to use the $HTTP_SESSION_VARS[ variables as they are now depricated. you should use $_SESSION instead.

      Write a Reply...