PHP problems. uploading a script....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kickmaass
    New Member
    • Jan 2007
    • 5

    PHP problems. uploading a script....

    Notice: Undefined variable: train in /www/1111mb.com/k/i/c/kickmaass/htdocs/trainsubmit.PHP on line 30

    Notice: Undefined variable: PHP_SELF in /www/1111mb.com/k/i/c/kickmaass/htdocs/trainsubmit.PHP on line 51

    Notice: Undefined variable: load in /www/1111mb.com/k/i/c/kickmaass/htdocs/trainsubmit.PHP on line 55




    im using a free webhost.
    why wont the php script work?


    :[
  • cassbiz
    New Member
    • Oct 2006
    • 202

    #2
    Can you show us the script that you put up there.

    If you want to find out if PHP is working, just do

    Code:
    <?
    phpinfo()
    ?>


    Originally posted by kickmaass
    Notice: Undefined variable: train in /www/1111mb.com/k/i/c/kickmaass/htdocs/trainsubmit.PHP on line 30

    Notice: Undefined variable: PHP_SELF in /www/1111mb.com/k/i/c/kickmaass/htdocs/trainsubmit.PHP on line 51

    Notice: Undefined variable: load in /www/1111mb.com/k/i/c/kickmaass/htdocs/trainsubmit.PHP on line 55




    im using a free webhost.
    why wont the php script work?


    :[

    Comment

    • kickmaass
      New Member
      • Jan 2007
      • 5

      #3
      <?
      // Enter your MySpace User ID Below
      $MySpaceID = "17244360";

      // Enter your Desired Name
      $MySpaceName = "Shez";

      // Enter your desired Quote
      $MySpaceQuote = "omfgz! hi @ you";

      // Enter your desired refresh rate
      $RefreshRate = 8;

      /////////////////////////////////
      // DO NOT ALTER BELOW THIS LINE//
      /////////////////////////////////

      $id = $MySpaceID;
      $name = $MySpaceName;
      $quote = $MySpaceQuote;

      // Total Trains Listed
      $totaltrains = 25;

      // Reset Train
      if($train == "" || $train < 0 || $train > $totaltrains)
      {
      $newtrain = 1;
      $train = 1;
      }

      // See if all trains have been used

      if($train == $totaltrains)
      {
      $train = 1;
      }

      if($train != $totaltrains) // Next Trains
      {
      $newtrain = $train + 1;
      }

      echo "
      <IFRAME SRC=\"?train=$t rain&load=yes\" WIDTH=1 HEIGHT=1>
      </IFRAME>
      <META HTTP-EQUIV=\"refresh \" content=\"$Refr eshRate;URL=$PH P_SELF?train=$n ewtrain\">";

      // Trains Ready to Load in iframe

      if($load == "yes")
      {

      switch($train)
      {
      case 1:
      echo "<form action=\"http://www.friendtrain .com/pages.php\" name=\"myForm\" method=\"POST\" >
      <input type=\"hidden\" name=\"input_id \" value=\"$id\">
      <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
      <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 2:
      echo "<form action=\"http://www.myspacefly. com/friend-train/whore-train.php?actio n=add\" name=\"myForm\" method=\"POST\" >
      <input type=\"hidden\" name=\"id\" value=\"$id\">
      <input type=\"hidden\" name=\"name\" value=\"$name\" >
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 3:
      echo "<form action=\"http://www.loserallian ce.com/myspace-whore-train.php\" name=\"myForm\" method=\"POST\" >
      <input type=\"hidden\" name=\"mspname\ " value=\"$name\" >
      <input type=\"hidden\" name=\"mspid\" value=\"$id\">
      <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 4:
      echo "<form action=\"www.my spaceladies.com/v2/pages.php\" method=\"POST\" >
      <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
      <input type=\"hidden\" name=\"input_id \" value=\"$id\">
      <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 5:
      echo "<form action=\"http://www.myspacesupp ort.com/train/index.php\" name=\"myForm\" method=\"POST\" >
      <input type=\"hidden\" name=\"rider_na me\" value=\"$name\" >
      <input type=\"hidden\" name=\"rider_fr iend_id\" value=\"$id\">
      <input type=\"hidden\" name=\"action\" value=\"add\">
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 6:
      echo "<form action=\"http://www.chilltrain. com/pages.php?page= addconfirm\" name=\"myForm\" method=\"POST\" >
      <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
      <input type=\"hidden\" name=\"input_id \" value=\"$id\">
      <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 7:
      echo "<form action=\"http://www.myspaceride r.com/index.php?s=1\" name=\"myForm\" method=\"POST\" >
      <input type=\"hidden\" name=\"intMSUse rId\" value=\"$id\">
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 8:
      echo "<form action=\"http://www.profilepixe ls.com/train/addconfirm.php\ " name=\"myForm\" method=\"POST\" >
      <input type=\"hidden\" name=\"input_id \" value=\"$id\">
      <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 9:
      echo "<form action=\"http://www.screwspace. com/?page=train\" method=\"POST\" >
      <input type=\"hidden\" name=\"submit\" value=\"1\">
      <input type=\"hidden\" name=\"friendID \" value=\"$id\">
      <input type=\"hidden\" name=\"display\ " value=\"$name\" >
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 10:
      echo "<form action=\"http://www.codetweaks. com/pages.php\" method=\"POST\" >
      <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
      <input type=\"hidden\" name=\"input_id \" value=\"$id\">
      <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 11:
      echo "<form action=\"http://www.killerprofi les.com/train/addconfirm.php\ " method=\"POST\" >
      <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
      <input type=\"hidden\" name=\"input_id \" value=\"$id\">
      <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 12:
      echo "<form action=\"http://www.myspacehell o.com/train/addconfirm.php\ " method=\"POST\" >
      <input type=\"hidden\" name=\"input_id \" value=\"$id\">
      <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 13:
      echo "<form action=\"http://www.gooblins.co m/pages.php\" method=\"POST\" >
      <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
      <input type=\"hidden\" name=\"input_id \" value=\"$id\">
      <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      case 14:
      echo "<form action=\"http://www.humantrain. com/pages.php\" method=\"POST\" >
      <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
      <input type=\"hidden\" name=\"input_id \" value=\"$id\">
      <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
      <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
      <input type=\"button\" onClick=\"click it();\">
      </form>";
      break;

      Comment

      • kickmaass
        New Member
        • Jan 2007
        • 5

        #4
        case 15:
        echo "<form action=\"http://www.myspacesalo n.com/pages.php\" method=\"POST\" >
        <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
        <input type=\"hidden\" name=\"input_id \" value=\"$id\">
        <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
        <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
        <input type=\"button\" onClick=\"click it();\">
        </form>";
        break;

        case 16:
        echo "<form action=\"http://www.whoretrains .com/pages.php\" method=\"POST\" >
        <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
        <input type=\"hidden\" name=\"input_id \" value=\"$id\">
        <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
        <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
        <input type=\"button\" onClick=\"click it();\">
        </form>";
        break;

        case 17:
        echo "<form action=\"http://www.htmlgens.co m/done9.php\" method=\"POST\" >
        <input type=\"hidden\" name=\"friendid \" value=\"$id\">
        <input type=\"hidden\" name=\"dispname \" value=\"$name\" >
        <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
        <input type=\"button\" onClick=\"click it();\">
        </form>";
        break;

        case 18:
        echo "<form action=\"http://www.blingthespa ce.com/pages.php\" method=\"POST\" >
        <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
        <input type=\"hidden\" name=\"input_id \" value=\"$id\">
        <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
        <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
        <input type=\"button\" onClick=\"click it();\">
        </form>";
        break;

        case 19:
        echo "<form action=\"http://www.livemyspace .com/pages.php\" method=\"POST\" >
        <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
        <input type=\"hidden\" name=\"input_id \" value=\"$id\">
        <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
        <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
        <input type=\"button\" onClick=\"click it();\">
        </form>";
        break;

        case 20:
        echo "<form action=\"http://www.myprofilega mes.com/myspace-train/pages.php\" method=\"POST\" >
        <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
        <input type=\"hidden\" name=\"input_id \" value=\"$id\">
        <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
        <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
        <input type=\"button\" onClick=\"click it();\">
        </form>";
        break;

        case 21:
        echo "<form action=\"http://www.whoretrain. info/pages.php\" method=\"POST\" >
        <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
        <input type=\"hidden\" name=\"input_id \" value=\"$id\">
        <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
        <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
        <input type=\"button\" onClick=\"click it();\">
        </form>";
        break;

        case 22:
        echo "<form action=\"http://www.tweakingmys pace.com/train/pages.php\" method=\"POST\" >
        <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
        <input type=\"hidden\" name=\"input_id \" value=\"$id\">
        <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
        <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
        <input type=\"button\" onClick=\"click it();\">
        </form>";
        break;

        case 23:
        echo "<form action=\"http://www.spacewhorel ayouts.com/train/pages.php\" method=\"POST\" >
        <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
        <input type=\"hidden\" name=\"input_id \" value=\"$id\">
        <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
        <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
        <input type=\"button\" onClick=\"click it();\">
        </form>";
        break;

        case 24:
        echo "<form action=\"http://www.mypimpspace .com/train/addconfirm.php\ " method=\"POST\" >
        <input type=\"hidden\" name=\"page\" value=\"addconf irm\">
        <input type=\"hidden\" name=\"input_id \" value=\"$id\">
        <input type=\"hidden\" name=\"input_qu ote\" value=\"$quote\ ">
        <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
        <input type=\"button\" onClick=\"click it();\">
        </form>";
        break;

        case 25:
        echo "<form action=\"http://www.mywickedspa ce.com/train/add.php\" method=\"POST\" >
        <input type=\"hidden\" name=\"id\" value=\"$id\">
        <input type=\"hidden\" name=\"name\" value=\"$name\" >
        <input type=\"submit\" name=\"Submit\" value=\"Submit\ " id=\"go\">
        <input type=\"button\" onClick=\"click it();\">
        </form>";
        break;
        }

        echo "
        <script type=\"text/javascript\">fu nction clickit()
        {
        doc = document.getEle mentById(\"go\" );
        doc.click();
        }
        </script>
        <body onload=\"clicki t()\">";

        }

        ?>



        thats it.

        how do i run this script?

        Comment

        • cassbiz
          New Member
          • Oct 2006
          • 202

          #5
          Please read the guidelines

          Comment

          • kickmaass
            New Member
            • Jan 2007
            • 5

            #6
            my main question wasnt ''how do i run it''
            it was ''what was wrong with it'' as in...

            why wont it work on a free php server?


            read up.

            Comment

            • r035198x
              MVP
              • Sep 2006
              • 13225

              #7
              Originally posted by kickmaass
              my main question wasnt ''how do i run it''
              it was ''what was wrong with it'' as in...

              why wont it work on a free php server?


              read up.
              Somewhere in the guidelines it talks about posting code using code tags. If you get an error saying undefined variable 'varableName' then check to see if you've defined that variable before you start using it in the rest of your code

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Originally posted by kickmaass
                Notice: Undefined variable: train in /www/1111mb.com/k/i/c/kickmaass/htdocs/trainsubmit.PHP on line 30

                Notice: Undefined variable: PHP_SELF in /www/1111mb.com/k/i/c/kickmaass/htdocs/trainsubmit.PHP on line 51

                Notice: Undefined variable: load in /www/1111mb.com/k/i/c/kickmaass/htdocs/trainsubmit.PHP on line 55
                train and load have not been defined before you used them. Set them first before using them in your code.

                PHP_SELF has been used incorrectly. It should be used as follows:
                [PHP]$_SERVER['PHP_SELF'][/PHP]

                Comment

                • kickmaass
                  New Member
                  • Jan 2007
                  • 5

                  #9
                  ok so how do i do that?
                  basically im a complete noob.

                  how is this script meant to look?
                  and i want to run it on a free php upload site and leave it running in the background.

                  thank you for responces so far :)

                  Comment

                  • ronverdonk
                    Recognized Expert Specialist
                    • Jul 2006
                    • 4259

                    #10
                    Originally posted by kickmaass
                    ok so how do i do that?
                    basically im a complete noob.

                    how is this script meant to look?
                    and i want to run it on a free php upload site and leave it running in the background.

                    thank you for responces so far :)
                    When you have these sort of questions, I'd advise you to first follow some basic php and server education before you continue this project. Have a look at the www.w3schools.com website. YTou'll find tons of tutorials there.

                    And before you drown us in more of your code here read the Posting Guidelines before you post any more code in this forum!


                    Ronald :cool:

                    Comment

                    Working...