Problem with Game Script

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Problem with Game Script

    Hi all!
    I've got a problem with a game script that i bought from someone.
    ( € 1,30 )

    I've installed everything like the manual says but i cannot log in. When i want to log in i get an error: Username and/or password incorrect.

    I've asked the same question to the scripter but he does not give me any support *kick*

    Can someone help me with this script? I am a totally php/MySQL noob.

    I've uploaded the script source to my ftp server.

    http://huizen.dto.tudelft.nl/Geboers/game.rar

  • #2
    Hi!

    Please post the code of the login-script and not rar or zip file.
    thx.
    h.a.n.d.
    Schmalle

    http://impressed.by
    http://blog.schmalenberger.it



    Wichtige Anmerkung: Ich habe keine Probleme mit Alkohol ...
    ... nur ohne :-)

    Kommentar


    • #3
      //// Connect.php ////

      <?php
      extract($_POST);
      extract($_GET);
      extract($_SERVER);
      extract($_FILES);
      extract($_ENV);
      extract($_COOKIE);
      extract($_SESSION);


      $database_server = mysql_connect("localhost",
      "username", "password");


      mysql_select_db("databasename", $database_server);

      ?>

      /// Admin.php ///

      <?php
      session_start();
      ?>

      <html>
      <head>
      <title>Login pagina</title>
      </head>
      <body>

      <form method="post" action="admin.php">
      <input type="hidden" name="Submit" value="1">
      <input type="text" name="LoginNaam">
      <input type="password" name="LoginPassword">
      <input type="submit" value="Login">
      </form>

      <p>

      <?php

      If ($Submit) {

      include ("connect.php");

      $LoginNaam = addslashes($LoginNaam);
      $LoginPassword = addslashes($LoginPassword);

      $Query = mysql_query("SELECT * FROM admin WHERE gebruikersnaam = '$LoginNaam' AND wachtwoord = '$LoginPassword'");
      $Results = mysql_num_rows($Query);

      if ($Results == '1') {

      $Login = "1";
      session_register("Login");

      echo "Je bent ingelogd. Klik <a href=\"admin/index.php\">hier</a> om verder te gaan.\n";

      }
      else {

      echo " Je gebruikersnaam of password klopt niet.\n";

      }

      }
      ?>

      </body>
      </html>

      /// Game.php ///

      <title>Online games op Superspellen!</title>
      <?php
      $refurl ="$HTTP_REFERER";

      include "connect.php";



      $sql = "SELECT * FROM spellen WHERE id = '$id'";


      $resultaat = mysql_query($sql);



      while ($record = mysql_fetch_object($resultaat)) {

      echo "<div align=\"center\"> <IFRAME src=\"$record->link\" name=\"game\" align=\"center\" width=\"$record->g1\" height=\"$record->g2\" marginheight=0 marginwidth=0 frameborder=\"no\"></div></p></IFRAME>
      "; }

      ?>

      /// Games.php ///

      <?php
      include ("connect.php");
      $sql = "SELECT * FROM spellen WHERE categorie = '$cat' LIMIT 30";


      $resultaat = mysql_query($sql);





      while ($record = mysql_fetch_object($resultaat)) {
      echo "<a href=\"#\" onClick=\"window.open ('game.php?id=$record->id','gamepopup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable =no,copyhistory=no,width=$record->g1,height=$record->g2,screenX=300,screenY=200,top=150,left=200'); return false;\">$record->naam</a> <br>";
      }
      ?>


      /// SQL.txt ///

      CREATE TABLE `admin` (
      `gebruikersnaam` varchar(50) NOT NULL default '',
      `wachtwoord` varchar(50) NOT NULL default ''
      ) TYPE=MyISAM;

      INSERT INTO `admin` VALUES ('username', 'password');


      CREATE TABLE `categorieën` (
      `cat` varchar(50) NOT NULL default ''
      ) TYPE=MyISAM;


      INSERT INTO `categorieën` VALUES ('actie');
      INSERT INTO `categorieën` VALUES ('avontuur');
      INSERT INTO `categorieën` VALUES ('behendigheid');
      INSERT INTO `categorieën` VALUES ('race');
      INSERT INTO `categorieën` VALUES ('sport');


      CREATE TABLE `spellen` (
      `id` int(5) NOT NULL auto_increment,
      `naam` varchar(20) NOT NULL default '',
      `link` varchar(100) NOT NULL default '',
      `categorie` varchar(20) NOT NULL default '',
      `g1` int(5) NOT NULL default '0',
      `g2` int(5) NOT NULL default '0',
      PRIMARY KEY (`id`)
      ) TYPE=MyISAM AUTO_INCREMENT=10 ;

      Kommentar


      • #4
        please add/change the red marked parts:


        //// Connect.php ////

        <?php
        extract($_POST);
        extract($_GET);
        extract($_SERVER);
        extract($_FILES);
        extract($_ENV);
        extract($_COOKIE);
        extract($_SESSION);


        $database_server = mysql_connect("localhost",
        "username", "password") [color=red]or die(mysql_error());[/color]


        mysql_select_db("databasename", $database_server) [color=red]or die(mysql_error());[/color]

        ?>

        /// Admin.php ///

        <?php
        session_start();
        ?>

        <html>
        <head>
        <title>Login pagina</title>
        </head>
        <body>

        <form method="post" action="admin.php">
        <input type="hidden" name="Submit" value="1">
        <input type="text" name="LoginNaam">
        <input type="password" name="LoginPassword">
        <input type="submit" value="Login">
        </form>

        <p>

        <?php

        If ($Submit) {

        include ("connect.php");

        $LoginNaam = addslashes($LoginNaam);
        $LoginPassword = addslashes($LoginPassword);

        [color=red]$querystring = "SELECT * FROM admin WHERE gebruikersnaam = '$LoginNaam' AND wachtwoord = '$LoginPassword'";
        echo $querystring;
        $Query = mysql_query($querystring) or die(mysql_error());[/color]

        if ($Results == '1') {

        $Login = "1";
        session_register("Login");

        echo "Je bent ingelogd. Klik <a href=\"admin/index.php\">hier</a> om verder te gaan.\n";

        }
        else {

        echo " Je gebruikersnaam of password klopt niet.\n";

        }

        }
        ?>

        </body>
        </html>

        /// Game.php ///

        <title>Online games op Superspellen!</title>
        <?php
        $refurl ="$HTTP_REFERER";

        include "connect.php";



        $sql = "SELECT * FROM spellen WHERE id = '$id'";


        $resultaat = mysql_query($sql);



        while ($record = mysql_fetch_object($resultaat)) {

        echo "<div align=\"center\"> <IFRAME src=\"$record->link\" name=\"game\" align=\"center\" width=\"$record->g1\" height=\"$record->g2\" marginheight=0 marginwidth=0 frameborder=\"no\"></div></p></IFRAME>
        "; }

        ?>

        /// Games.php ///

        <?php
        include ("connect.php");
        $sql = "SELECT * FROM spellen WHERE categorie = '$cat' LIMIT 30";


        $resultaat = mysql_query($sql);





        while ($record = mysql_fetch_object($resultaat)) {
        echo "<a href=\"#\" onClick=\"window.open ('game.php?id=$record->id','gamepopup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable =no,copyhistory=no,width=$record->g1,height=$record->g2,screenX=300,screenY=200,top=150,left=200'); return false;\">$record->naam</a> <br>";
        }
        ?>


        /// SQL.txt ///

        CREATE TABLE `admin` (
        `gebruikersnaam` varchar(50) NOT NULL default '',
        `wachtwoord` varchar(50) NOT NULL default ''
        ) TYPE=MyISAM;

        INSERT INTO `admin` VALUES ('username', 'password');


        CREATE TABLE `categorieën` (
        `cat` varchar(50) NOT NULL default ''
        ) TYPE=MyISAM;


        INSERT INTO `categorieën` VALUES ('actie');
        INSERT INTO `categorieën` VALUES ('avontuur');
        INSERT INTO `categorieën` VALUES ('behendigheid');
        INSERT INTO `categorieën` VALUES ('race');
        INSERT INTO `categorieën` VALUES ('sport');


        CREATE TABLE `spellen` (
        `id` int(5) NOT NULL auto_increment,
        `naam` varchar(20) NOT NULL default '',
        `link` varchar(100) NOT NULL default '',
        `categorie` varchar(20) NOT NULL default '',
        `g1` int(5) NOT NULL default '0',
        `g2` int(5) NOT NULL default '0',
        PRIMARY KEY (`id`)
        ) TYPE=MyISAM AUTO_INCREMENT=10 ;



        result?
        I don't believe in rebirth. Actually, I never did in my whole lives.

        Kommentar


        • #5
          Re: Problem with Game Script

          Original geschrieben von signs
          ...
          I've asked the same question to the scripter but he does not give me any support *kick*

          ...
          well signs, how much support do you expect to be included in a software-investment of EUR 1,30 ?

          in the original sql.txt it says
          Code:
          INSERT INTO `admin` VALUES ('gebruikersnaam', 'wachtwoord');
          Which values did you use to create the admin-Table ?

          nice day
          Quickborner

          Kommentar


          • #6
            Lol, sieht nach Niederländisch aus ^^


            An mich bitte keine unaufgeforderten E-Mails senden (ausser ihr seid bereit geld zu zahlen, dann gerne )

            Kommentar


            • #7
              Original geschrieben von MaxP0W3R
              Lol, sieht nach Niederländisch aus ^^
              Das macht das Script aber auch nicht besser .)
              h.a.n.d.
              Schmalle

              http://impressed.by
              http://blog.schmalenberger.it



              Wichtige Anmerkung: Ich habe keine Probleme mit Alkohol ...
              ... nur ohne :-)

              Kommentar


              • #8
                @Wahsaga

                This is the result i get when i changed the things (connect.php etc)

                ?php extract($_POST); extract($_GET); extract($_SERVER); extract($_FILES); extract($_ENV); extract($_COOKIE); extract($_SESSION); $database_server = mysql_connect("localhost", "ikhouvandebbie_nl", "*****") or die(mysql_error()); mysql_select_db("ikhouvandebbie_nl_1", $database_server) or die(mysql_error()); ?> SELECT * FROM admin WHERE gebruikersnaam = 'kevin' AND wachtwoord = '***' Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


                And ofcourse the **** is the password

                Kommentar


                • #9
                  Re: Re: Problem with Game Script

                  Original geschrieben von Quickborner
                  well signs, how much support do you expect to be included in a software-investment of EUR 1,30 ?

                  Yeah yeah i know, but on the site he said he will support the script


                  in the original sql.txt it says
                  Code:
                  INSERT INTO `admin` VALUES ('gebruikersnaam', 'wachtwoord');
                  Which values did you use to create the admin-Table ?

                  I don't know...i'm a php/MySQL noob


                  nice day
                  Quickborner

                  Kommentar


                  • #10
                    Original geschrieben von signs
                    This is the result i get when i changed the things (connect.php etc)

                    ?php extract($_POST); extract($_GET); extract($_SERVER); extract($_FILES); extract($_ENV); extract($_COOKIE); extract($_SESSION);
                    no, you shouldn't get all this crap - this is unparsed PHP-code.

                    i assume your file is missing the leading <
                    you wrote ?php instead of <?php

                    please fix this issue, and try again.
                    I don't believe in rebirth. Actually, I never did in my whole lives.

                    Kommentar


                    • #11
                      Original geschrieben von MaxP0W3R
                      Lol, sieht nach Niederländisch aus ^^
                      oder belgisch (beide Sprachen kann cih ...)

                      P.S. Wir haben das gamescript umsonst, er musste zahlen lol

                      to threadstarter:

                      u kunt deze verkrijgen aan €10 via ...
                      And you bought it for 1.30

                      - Open sql.txt en wijzig zoek de regel waar staat: (INSERT INTO `admin` VALUES ('gebruikersnaam', 'wachtwoord')
                      If yoe didnt done this, ure loginname = gebruikersnaam and youre password = wachtwoord. If you have changed this values, you must know youre password and username
                      Zuletzt geändert von davidovich; 02.09.2004, 20:30.

                      Forumregeln!

                      Gute PHP-(tutorial-)Seiten

                      Kommentar


                      • #12
                        true i've changed this to

                        Kommentar


                        • #13
                          We seem to have a number of problems here, as posted above.... However there is one more thing that struck me as quite essential:

                          Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
                          This has nothing to do with the script itself. What kind of environment are you trying to install this on?
                          Zuletzt geändert von pekka; 02.09.2004, 22:01.

                          Kommentar


                          • #14
                            On a MySQL database. (my hosting is Lycos and not the free pages)

                            Kommentar


                            • #15
                              All right. So what is your status now? Did the hints help? What is the Script's output right now?

                              Kommentar

                              Lädt...
                              X