Re: sessions not working
Delirium tremens wrote:
<?php
session_start();
if (isset($_POST[submit])) {
if(!isset($_SESSION['cheese'])) {
$_SESSION['cheese'] = 1;
} else {
$_SESSION['cheese']++;
}
}
?>
<html><head><title>Session Test</title></head>
<body>
Current Session Variable value is: <?= $_SESSION['cheese'] ?> <br/>
<form method="post">
<input type=submit value=click name=submit>
</form>
</body>
</html>
I click it once and session variable becomes 1.
I click it again, but session variable does not increase!
Apache is 2.2.9
PHP is installed according to http://apacheguide.org/
mbstring.dll and mysql.dll extensions are uncommented
short open tag is on
PHP is 5.2.6
How to solve this problem?
it all looks good except that
$_POST[submit] should be $_POST['submit']
correct that and it should work
regards trookat
.
Relevant Pages
- sessions not working
... Apache is 2.2.9 ... PHP is installed according to http://apacheguide.org/ ... mbstring.dll and mysql.dll extensions are uncommented ... short open tag is on ... (comp.lang.php) - RE: STG Security Advisory: [SSA-20041215-17] Vulnerability of uploading files with multiple exten
... "multiple extensions" behaviour in the past. ... There are a huge number of 3rd party PHP scripts out there ... upload a file without a registered MIME type are somewhat reduced. ... extensions behaviour for handlers as there seemed no legitimate ... (Bugtraq) - Loading DLLs from different path
... PHP is a popular server-side scripting language for web servers. ... It popularity is mainly due that it has many 3rd party extensions. ... The issue is that our DLL is dependent on RPC application server API DLLs in a different folder. ... The problem is that we never recommended putting dlls on the PATH nor do we recommend for our customers to have copies of DLLS over all the place. ... (microsoft.public.win32.programmer.kernel) - Re: php?
... Also does this mean i can run php on the subsites while not affecting the ... When you use PHP with FrontPage 2003, you create the overall Web page design ... If you do not administer your own Web server, ... Disable features that require the FrontPage Server Extensions ... (microsoft.public.windows.server.sbs) - Re: php extensions compile error - another compile bug?
... Re: php extensions compile error - another compile bug?: ... Is not triviality is a matter of perspective? ... AFFECTS: users of PHP ... and shared extensions to allow more flexibility and add new features. ... (freebsd-questions) |
|