• PHP Trivia

    From Spectre@21:3/101 to Anybody on Mon Sep 21 22:59:00 2020
    PHP pain continues unabated. I'm working with an ANTIQUE script from ìsomewhere... we can tell its an antique because its trying to use ì$_HTTP_POST_VARS instead of $_POST that was easy enough to find and fix but ìits also trying to use sessions to shift values to subsequent script ìportions.

    I've never come across sessions before, and so far as I can tell they aren't ìworking despite entering values into the post form the contents remain ìsteadfastly empty. So its not letting anyone log in or create themselves a ìuser.

    Suggestions? I s'pose the top one is find a more recent trivia game, ìalthough this one seems to otherwise fit the bill. Is there anything ìobviously wrong with this?

    session_start();

    if (empty($_SESSION))
    {
    $_SESSION['action'] = $strAction = "Create New User";
    }
    else
    {
    if (strlen(trim($_SESSION['name'])) > 0)
    {
    $strName = $_SESSION['name'];
    $_SESSION['action'] = $strAction = "Change Password";
    }
    else
    {
    $strName = "";
    $_SESSION['action'] = $strAction = "Create New User";
    }

    if (!empty($_SESSION['message']))
    {
    $strMessage = trim($_SESSION['message']);
    }
    }


    Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: (21:3/101)
  • From alterego@21:2/116 to Spectre on Thu Sep 24 01:04:33 2020
    Re: PHP Trivia
    By: Spectre to Anybody on Mon Sep 21 2020 06:59 pm

    Howdy,

    although this one seems to otherwise fit the bill. Is there anything obviously wrong with this?

    There doesnt appear to be anything unusual with that snippet of PHP.

    ...δεσ∩

    ... Interchangeable parts won't.
    --- SBBSecho 3.11-Linux
    * Origin: I'm playing with ANSI+videotex - wanna play too? (21:2/116)
  • From Spectre@21:3/101 to alterego on Thu Sep 24 07:02:00 2020
    There doesnt appear to be anything unusual with that snippet of PHP.

    It doesn't appear to be getting the session variables across... I might have ìot go and have a look at the naming.

    Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: (21:3/101)
  • From Spectre@21:3/101 to alterego on Thu Sep 24 07:46:00 2020
    There doesnt appear to be anything unusual with that snippet of PHP.

    Well assuming all the sessions code is right, I went back an started trying ìto follow the logic of the thing again... It was running afoul of another ìcouple of $_HTTP_POST_VARS statements after another post form further in. ìSeems to be reasonably functional now. I just have to get some questions in ìplace to test further.

    Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: (21:3/101)