Results 1 to 2 of 2

Thread: [PHP] Help!!!

  1. #1
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default [PHP] Help!!!

    I am trying to make a place where you can show your xp gained from scar. I need some help with getting the code to the page. It works, but, the number that prints is always zero. Please help:

    Scar Code:

    SCAR Code:
    program New;
    procedure SendXp;
    var xpshareclient: integer;
      woodxp, minexp, fishxp, combatxp, fletxp, smithxp: integer;
    begin
      woodxp := 3;
      xpshareclient := InitializeHTTPClient(false, false);
      ClearPostData(xpshareclient);
      AddPostVariable(xpshareclient, 'Woodcutting', IntToStr(woodxp));
      AddPostVariable(xpshareclient, 'Mining', IntToStr(minexp));
      AddPostVariable(xpshareclient, 'Fishing', IntToStr(fishxp));
      AddPostVariable(xpshareclient, 'Combat', IntToStr(combatxp));
      AddPostVariable(xpshareclient, 'Fletching', IntToStr(fletxp));
      AddPostVariable(xpshareclient, 'Smithing', IntToStr(smithxp));
      PostHTTPPageEx(xpshareclient, 'http://cutem2it.freeweb7.com/xpshare.php');
      FreeHTTPClient(xpshareclient);
    end;
    begin
      SendXp;
    end.

    Php Code:

    PHP Code:
    <?
      $Woodcuttingxp = $Woodcuttingxp + Woodcutting;
      echo $Woodcuttingxp;
    ?>
    Thanks,
    Cut em2 it
    Formerly known as Cut em2 it

  2. #2
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    How are you viewing the page? I don't see anything in your SCAR script that prints out the page response once it's done processing. Hitting it from the browser will send no data to the PHP script.

    Your PHP script is also a bit messed up. Here's a working version:

    PHP Code:
    <?php
    $Woodcuttingxp 
    $_POST['Woodcutting'];
    echo 
    $Woodcuttingxp;
    ?>
    $_POST retrieves a POST variable sent, and $_GET retrieves a GET variable.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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