User Tag List

Page 2 of 9 FirstFirst 1 2 3 4 ... LastLast
Results 11 to 20 of 83

Thread: Online Highscores Help

  1. #11
    No Products Registered

    Join Date
    Nov 2006
    Location
    Australia
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Highscores Help

    hmm... Any idea how to change it?

    Do i need to use microsoft word? because another computer in our house has it.

  2. #12
    No Products Registered

    Join Date
    Mar 2007
    Location
    San Diego
    Posts
    280
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Highscores Help

    open it up in notepad again and do save as and change the extension to .php instead of .txt

  3. #13
    No Products Registered

    Join Date
    Nov 2006
    Location
    Australia
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Highscores Help

    It dosent make adifference when i put .php at the end, but while saving there are there 3 options in encoding: ANSI, UNICODE, UNICODEbidedia and UTF-8. By default it's on ANSI so im not sure if it makes a difference.

    BTW thanks for help so far ketchip : )

  4. #14
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Highscores Help

    no he means just change it.

    you may need to disable hide known file types in the folder view menu.

    Best of luck

  5. #15
    No Products Registered

    Join Date
    Nov 2006
    Location
    Australia
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Highscores Help

    The filename is displayscores.php but it is still a text file.

    ooo i see that you mean, there is no .php extension. It isn't on microsoft word either =(

    Is it even neccesary to complete the tutorial to upload a word document with the coding?

    Thanks for the luck, think i need it ; )
    Also thanks to everyone contributing there time to my problem, very (very) much appreciated.

  6. #16
    No Products Registered

    Join Date
    Mar 2007
    Location
    San Diego
    Posts
    280
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Highscores Help

    try this:

    turn off hide file extensions for known file types like this:
    - select Start | Settings | Control Panels | Folder Options
    - select the View tab
    - UNcheck "hide file extensions for known file types"
    - Click OK to finish

    then try to rename the file to .php within windows

  7. #17
    No Products Registered

    Join Date
    Nov 2006
    Location
    Australia
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Highscores Help

    alrighty i try that in a sec...

  8. #18
    No Products Registered

    Join Date
    Nov 2006
    Location
    Australia
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Highscores Help

    Alright, when i try to press save it just does nothing.. Dosen't work on microsoft word either.

  9. #19
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Highscores Help

    This is the problem a lot of people have with file extensions. Here is what you do:

    1. Open a blank notepad.
    2. Copy and paste the php text from the other failed one or just start over with a new one.
    3. Go to File>Save As
    4. Under "Save As Type" select All Files
    5. Make the file name "whatever.php" without quotations.
    5. Hit Save

    And your done, this makes it an absolute php file, the encoding shouldn't matter, but to stay on the safe side, leave it as ANSI. I just tested this and I know it works, because instead of a text icon on the file, I have a Dreamweaver icon, which I have defaulted for php.

    ---EDIT---
    Quote Originally Posted by dylan99379
    <html>
    <head>
    <title>Online Scoreboard Tutorial - Scores</title>
    </head>
    <body>

    <?

    $service = "sql112.byethost13.com";
    $username = "b13_1564643";
    $password = "*******";
    $database = "highscores";

    mysql_connect($service, $username, $password);
    @mysql_select_db($database) or die( "Unable to select database");

    $query = "SELECT * FROM highscores";
    $result = mysql_query($query);
    $num = mysql_numrows($result);

    ?>

    <table>
    <tr class="header"><td>Pos</td><td>Name</td><td>Score</td><td>Date Submitted</td></tr>

    <?

    $loopindex = 0;

    while ($loopindex < $num) {

    $thisname = mysql_result($result, $loopindex, "name");
    $thisscore = mysql_result($result, $loopindex, "combatexperience");
    $thisdate = mysql_result($result, $loopindex, "datesubmitted");
    $thispos = $loopindex+1;

    echo ("<tr><td align=left><p>$thispos</p></td>
    <td align=center><p>$thisname</p></td>
    <td align=center><p>$thisscore</p></td>
    <td align=center><p>$thisdate</p></td></tr>\n");

    $loopindex++;
    }

    ?>

    </table>
    </body>
    </html>
    There is a problem in the php code right here at "$database = "highscores";" That is the table name, and the database should be something longer probably like bytehost12_highscore, you will find it in the phpMyAdmin. This line is correct
    "$query = "SELECT * FROM highscores" because it uses the table name. If you fix the database thing you should be alright.

  10. #20
    No Products Registered

    Join Date
    Nov 2006
    Location
    Australia
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Online Highscores Help

    Quote Originally Posted by Brandon
    This is the problem a lot of people have with file extensions. Here is what you do:

    1. Open a blank notepad.
    2. Copy and paste the php text from the other failed one or just start over with a new one.
    3. Go to File>Save As
    4. Under "Save As Type" select All Files
    5. Make the file name "whatever.php" without quotations.
    5. Hit Save

    And your done, this makes it an absolute php file, the encoding shouldn't matter, but to stay on the safe side, leave it as ANSI. I just tested this and I know it works, because instead of a text icon on the file, I have a Dreamweaver icon, which I have defaulted for php.

    ---EDIT---
    Quote Originally Posted by dylan99379
    <html>
    <head>
    <title>Online Scoreboard Tutorial - Scores</title>
    </head>
    <body>

    <?

    $service = "sql112.byethost13.com";
    $username = "b13_1564643";
    $password = "*******";
    $database = "highscores";

    mysql_connect($service, $username, $password);
    @mysql_select_db($database) or die( "Unable to select database");

    $query = "SELECT * FROM highscores";
    $result = mysql_query($query);
    $num = mysql_numrows($result);

    ?>

    <table>
    <tr class="header"><td>Pos</td><td>Name</td><td>Score</td><td>Date Submitted</td></tr>

    <?

    $loopindex = 0;

    while ($loopindex < $num) {

    $thisname = mysql_result($result, $loopindex, "name");
    $thisscore = mysql_result($result, $loopindex, "combatexperience");
    $thisdate = mysql_result($result, $loopindex, "datesubmitted");
    $thispos = $loopindex+1;

    echo ("<tr><td align=left><p>$thispos</p></td>
    <td align=center><p>$thisname</p></td>
    <td align=center><p>$thisscore</p></td>
    <td align=center><p>$thisdate</p></td></tr>\n");

    $loopindex++;
    }

    ?>

    </table>
    </body>
    </html>
    There is a problem in the php code right here at "$database = "highscores";" That is the table name, and the database should be something longer probably like bytehost12_highscore, you will find it in the phpMyAdmin. This line is correct
    "$query = "SELECT * FROM highscores" because it uses the table name. If you fix the database thing you should be alright.
    Thanks for the very helpful reply!

    I tried saving the file as php again, but it would just refresh my icons and not do anything, so i used the file editor on bytehost. I renamed that to displayhighscores(*.PHP) and it worked!

    With the code problem, my database is also called highscores, so should i rename the code to b13_1564643_highscores or using the host name sql112.byethost13.com_highscores

    I'll be able to reply in about 6-6.5 hours.

    Again thanks everyone for there replies and help. Few names going in the credits of my game = )

Page 2 of 9 FirstFirst 1 2 3 4 ... LastLast

Similar Threads

  1. online highscores
    By mickarrow in forum SWF/Flash Export Module Version 2.0
    Replies: 12
    Last Post: 21st August 2011, 03:27 PM
  2. Online highscores?
    By BHGames in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 23rd October 2010, 12:01 PM
  3. Online Highscores - error message
    By Solgryn in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 17th February 2009, 09:51 PM
  4. How to do online highscores
    By Robin_Manager in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 30th August 2008, 07:05 PM

Posting Permissions

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