Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Testing Scripts

  1. #11
    Join Date
    Jun 2004
    Posts
    102

    Default

    PHP Sessions Test script

    Add the following script to your test.php page and keep refreshing the page in browser, this will show you the working of session. The session variable "count" is getting incremented with each refresh.

    Code:
    <?php
    session_start();
    // Use &#036;HTTP_SESSION_VARS with PHP 4.0.6 or less
    if (&#33;isset(&#036;_SESSION[&#39;count&#39;])) {
    &#036;_SESSION[&#39;count&#39;] = 0;
    } else {
    &#036;_SESSION[&#39;count&#39;]++;
    }
    echo "Count: =&#036;count";
    ?>

  2. #12
    Join Date
    Jun 2004
    Posts
    102

    Default

    TEST CGI SCRIPT

    #&#33;/usr/bin/perl
    print "Content-type: text/html&#092;n&#092;n";
    print "This is a test file &#092;n&#092;n";

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •