On Tuesday 24 April 2001 17:00, Hassan Arteaga wrote:
> Hi !!
>
> I just begin with PHP( but is the same as ASP ) and testing some
> examples...
>
> loock at the code:
>
> Page 1- Session.php
>
> <?php
> session_start();
> $myvar = 1;
> session_register("myvar");
> ?>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
> <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
> <meta name="ProgId" content="FrontPage.Editor.Document">
> <title>New Page 1</title>
> </head>
> <body>
> Hello visitor, you have seen this page <? echo $myvar; ?> times.<p>
> To continue, <A HREF="session1.php">click here</A>
> </body>
> </html>
>
> ___________________________________________________
>
>
> Page 2- Session1.php
> <?php
> session_start();
> ?>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
> <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
> <meta name="ProgId" content="FrontPage.Editor.Document">
> <title>New Page 1</title>
> </head>
> <body>
> Hello visitor, you have seen this page <?php echo $myvar; ?> times.<p>
> Your SID is:  <?php echo SID; ?> <p>
> </body>
> </html>
>
>
> Page 1 is ok..but when I click to go to page 2  I receive this results..
>
> Hello visitor, you have seen this page times.
> Your SID is: SID
>
> Who can tell me what happend !!
>
> Thank you in advanced !!!
>
> --
> M. Sc. Hassan Arteaga Rodríguez
> Microsoft Certified System Engineer
> Network Admin, WEB Programmer
> FUNDYCS, Ltd
> [EMAIL PROTECTED]

It should be echo $SID (I think) as this is a variable.
As for echo $myvar, You should register it again to use it,
so use session_register("myvar") before echoing it (You should 
increment it as well).
-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to