You miss closing }

Max Buvry wrote:

>Hi,
>
>I wish test the session. I use php 4.2.3 et session.auto_start is 1.
>
>My first example is :
>
><html>
><head>
><title>Session example</title>
><body>
>
><?php
>if ( !isset($_SESSION['count']) )
>{
>   $_SESSION['count']= 1;
>}
>else
>{
>   $_SESSION['count']++;
>}
>
>if ( $_SESSION['count'] < 5 )
>{
>   $cpt = $_SESSION['count'];
>   echo "hello ! : $cpt times";
>  
>
}

>else
>{
>   setcookie(session_name(),""); // setcookie(session_name(),"","","/");
>   $cpt = $_SESSION['count'];
>   echo "Session change<BR>";
>   echo "hello ! : $cpt times";
>   session_unset();
>   session_destroy();
>}
>?>
></body>
></html>
>
>I don't find the solution to use setcookie ; I try the two instructions
>above (the script is correct without the "else").
>
>An idea ?
>
>In advance, thanks.
>
>mb
>
>  
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to