Well... I'm assuming that you've done nothing besides determine what you want

What you haven't told us is anything about you or your ability to code this project...

-Have you written out a flow chart of how the whole gaming system will work or have you conceptualized this?

-What is your skill level with PHP and MySql?

Coding a gaming/league app from the ground up is going to require more than asking us for vague help

    well i am a beginner at coding. all i really want is a basic page where a player can go and upload his game after he wins. and a page where it display his win/lost.

      So you are basically looking at a user management system with a table to contain/track their stats

      What HAVE you done in PHP?

        yes that's exactly what I'm looking to do!! 🙂. what do you mean what have i done in php ? like what is my knowledge? , its somewhere between beginner and intermediate.

          LambofGod;10904318 wrote:

          yes that's exactly what I'm looking to do!! 🙂. what do you mean what have i done in php ? like what is my knowledge? , its somewhere between beginner and intermediate.

          lets re-phrase...

          do you know how to setup a database?
          do you know how to connect to a database?
          do you know how to use sessions for authenticating users and protecting areas?

            alright here is what i have so far.

            display_reps.php

            <?php

            $db = mysql_connect('dangmn.net', 'dangmnne_dangmnx', '*****'); //host, hostname, hostpass with your own

            if (!$db)
            {
            die('Could not connect: ' . mysql_error());
            }

            $db_selected = mysql_select_db("dangmnne_dangmnx", $db); //fill in DBname with your own

            if (!db_selected)
            {

            die("cant connect");

            }

            $result = mysql_query("SELECT replay FROM test");

            echo "<table ALIGN='center' border='1'>
            <tr>
            <th><FONT COLOR='#FFFFFF'>Replay</th>
            </tr>";

            while($row = mysql_fetch_array($result))
            {

            echo "<tr>";
            echo "<td ALIGN='CENTER'><FONT COLOR='#FFFFFF'>" . $row['replay'] . "</td>";
            echo "</tr>";
            }

            echo "</table>";

            mysql_close($db);

            ?>

            process_upload.php

            <?php

            $db = mysql_connect('dangmn.net', 'dangmnne', '*******'); // host, hostname, host password

            if (!$db)
            {
            die('Could not connect: ' . mysql_error());
            }

            $db_selected = mysql_select_db("dangmnne_dangmnx", $db); //fill in DBname with your own

            if (!db_selected)
            {

            die("cant connect");

            }

            if ($_FILES["file"]["error"] > 0)
            {
            echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
            }

            else
            {
            move_uploaded_file($FILES["file"]["tmp_name"], "upload/" . $FILES["file"]["name"]);

            	$replay = "upload/" . $_FILES["file"]["name"];
            	$replay2 = "<a href=\"http://dangmn.net/upload/" .$replay. "\"><img src = \"http://dangmn.net/image.jpg\" style=\"border-style: none\"/></a>";
            
            	$query = "INSERT INTO test (replay) 

            VALUES ('".$replay2."')";

            $result = mysql_query($query) or die(mysql_error());

            mysql_close($db);

            }
            ?>

            upload.php

            <html>
            <body>

            <form action="process_upload.php" method="post"
            <label for="file">Replay:</label>
            <input type="file" name="file" id="file" />
            <br />
            <input type="submit" name="Upload" value="Submit" />
            </form>

            </body>
            </html>

            the problem is every time i upload something i get that error,

              The error being:

              Table 'dangmnne_test.test' doesn't exist
              

              Based on that error, the DB name is 'dangmnne_test' and table name is 'test'

              IN your code it appears you are calling for table 'test' in db 'dangmnne_dangmnx'

                Write a Reply...