Jump to content

Gem

Members
  • Posts

    129
  • Joined

  • Last visited

Posts posted by Gem

  1. 1/4 final  semi final Final

     

    team 1

                  team 1

    team 5

                                  team 1

    team 3

                  team 3

    team 7

                                                  team 1

    team 2

                  team 2

    team 6

                                team 2

    team 4

                  team 4

    team 8

     

    FIGHT FOR 3rd PLACE

     

    team 5

                team 5

    team 7              team 4

                team 4

    team 6                            Team 3

                  team 6

    team 8                team 3

                  team 3

     

    This is how to seed players ... if your not that bothered, then u can put them in randomly ... but following the numbers, any byes go in the last numbers, i.e. if you have 7 teams, them "team 8" would be a bye. 

     

     

    Every team gets at least two matches.  Teams 3 and 4 drop down into the second round of the losers as semi finalists.  This is for 8 teams, but I can go up to 64 teams.

     

    Hope that helps a little bit xxxx

     

    PS: Team 1 - Gold

          Team 2 - Silver

          Team 3 - Bronze

  2. Hi all,

     

    Basically, what I'm trying to do it populate the drop down list with the names that are in the query (that works) but it's not happening, and I dont know why...

     

    <php?
    $conn = mysql_connect("CONNECTION") or trigger_error("SQL", E_USER_ERROR);
    $db = mysql_select_db('bssql',$conn) or trigger_error("SQL", E_USER_ERROR);
    if(isset($select)&&$select!=""){
    $select=$_GET['select'];
    }
    ?>
    
    <html>
    <body>
    
    <form action="<?php echo $PHP_SELF;?>" method="get">
    <select name="select">
    
    <option value="Select"></option>
    <?php
    $list=mysql_query("
    select distinct pname
    from pname, comp_result
    where comp_result.pname_id=pname.name_id
    ;")?>
    
    <option value="<? echo $list; ?>" </option>
    
    
    
    </select>
    <input type="submit" />
    </form>
    
    </body>
    </html> 
    
    <html>
    <body>

     

    This is what I'm getting back:

     

    PHP Warning: mysql_query() [function.mysql-query]: Can't connect to MySQL server on 'localhost' (10061) in d:\webspace\bradleystokejudoclub.co.uk\wwwroot\test.php on line 21 PHP Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in d:\webspace\bradleystokejudoclub.co.uk\wwwroot\test.php on line 21

     

    Hope you can help, this was supposed to be the easy bit, I still got to get it to display the info I want once its been submitted ?! Grrr

     

    Thanks

     

    Gem

  3. We're getting somewhere now ... I changed

    $result = mysql_query ('SELECT title, subtitle, article FROM articles WHERE id = "' . $id . '"');

     

    to this:

    $result = mysql_query ('SELECT title, subtitle, article FROM articles WHERE id = "' . $currentpage . '"');

     

    and now I get this:

    Notice: Undefined offset: 3 in d:\webspace\bradleystokejudoclub.co.uk\wwwroot\test1.php on line 10

     

    BUT ... it is also displaying the subtitle and the article ... just not the title, and its not taking any notice of the nl2br for the article ...

     

    Getting there though ... anyone know what that error means?

  4. where to though mate??

     

    <?php
    ini_set ("display_errors", "1");
    error_reporting(E_ALL);
    // database connection info
    if (isset ($_GET['currentpage']))
    $currentpage = $_GET['currentpage'];
    $conn = mysql_connect("80.94.196.33","gem","landseer") or trigger_error("SQL", E_USER_ERROR);
    $db = mysql_select_db('bssql',$conn) or trigger_error("SQL", E_USER_ERROR);
    $result = mysql_query ('SELECT title, subtitle, article FROM articles WHERE id = "' . $id . '"');
    while(list($id, $title, $subtitle, $article) = mysql_fetch_row($result))
    {
    echo $title;
    echo "<BR />";
    echo $subtitle;
    echo "<BR />";
    echo nl2br($article);
    echo "<BR />";
    }
    ?>

     

    All i want to is get the $id from the url of the page and then use that to tell the page which article it is I want echo'd ... all seemed so easy in my head  :(

     

    Heres the pages, that might help

    www.bradleystokejudoclub.co.uk/test.php

     

    and then click on one of the links and that is the page above

     

    :-\

  5. LOL - took me like a minute to see what the difference was there!

     

    Heres what I got now... I change the query to to select where id equals $id but all i get is a blank screen ...

     

    <?php
    // database connection info
    if (isset ($_GET['currentpage']))
    $currentpage = $_GET['currentpage'];
    $conn = mysql_connect("80.94.196.33","gem","landseer") or trigger_error("SQL", E_USER_ERROR);
    $db = mysql_select_db('bssql',$conn) or trigger_error("SQL", E_USER_ERROR);
    $result = mysql_query ('SELECT title, subtitle, article FROM articles WHERE id = "' . $id . '"');
    while(list($id, $title, $subtitle, $article) = mysql_fetch_row($result))
    {
    echo $title;
    echo "<BR />";
    echo $subtitle;
    echo "<BR />";
    echo nl2br($article);
    echo "<BR />";
    }
    ?>

  6. Thanks Rev - This is what i've got so far

     

    Test.php (This works)

    <?php
    
    $conn = mysql_connect("80.94.196.33","gem","landseer") or trigger_error("SQL", E_USER_ERROR);
    $db = mysql_select_db('bssql',$conn) or trigger_error("SQL", E_USER_ERROR);
    
    $result = mysql_query ("SELECT id, title, subtitle, article FROM articles ORDER BY ID DESC");
    while(list($id, $title, $subtitle, $article) = mysql_fetch_row($result))
    {
        echo " <a href='test1.php?currentpage=$id'>$title</a><BR />";
       echo $subtitle;
       echo "<BR />";
       echo "<BR />";
       
    }
    
    ?>

     

    Test1.php (this doesnt work)

    <?php
    // database connection info
    if (isset ($_GET['currentpage']))
    $currentpage = $_GET('currentpage');
    $conn = mysql_connect("80.94.196.33","gem","landseer") or trigger_error("SQL", E_USER_ERROR);
    $db = mysql_select_db('bssql',$conn) or trigger_error("SQL", E_USER_ERROR);
    $result = mysql_query ('SELECT title, subtitle, article FROM articles WHERE title = "' . $title . '"');
    while(list($title, $subtitle, $article) = mysql_fetch_row($result))
    {
    echo $title;
    echo "<BR />";
    echo $subtitle;
    echo "<BR />";
    echo nl2br($article);
    echo "<BR />";
    }
    ?>

     

    Error: PHP Fatal error: Call to undefined function: array() in d:\webspace\bradleystokejudoclub.co.uk\wwwroot\test1.php on line 4

     

    I'm getting close ... I can feel it in my bones =)

  7. Sorry

     

    Basically:

     

    I have a table (id, title, subtitle, article)

     

    On test.php I have listed listed title, subtitle by id desc

     

    title is linked as shown above

     

    I now want to be able to open that link and see title,subtitle,article on a new page, same page ... any page??

     

    Make sense now?? x

  8. Hiya

     

    I'm still stuck with getting my links to work ...

     

    at the moment they look like this:

     

    <a href='test1.php?currentpage=$id'>$title</a>

    (It used to be PHP_SELF but I thought it might work if I sent it to another page altogether)

     

    My question is ...

     

    How do I tell 'test1.php?currentpage=$id' what to display,

     

    or

     

    would this be better:

     

    <a href='$id.php'>$title</a>

     

    Although that still leaves me not knowing how to tell THAT page what to display ... am I making sense?

     

    Cheers

     

    Gem

  9. ???  my head hurts ...

     

    so, when you say have it go to a new page ... do you literally mean a new page, or ..test.php?id=1  ??

     

    that would be perfect, but I dont know how to do it.

     

    a clue perhaps?

     

    I really appreciate you help so much, I'm enjoying learning php and what it can do!! =)

     

    Gem x

     

     

     

     

  10. LOL sorry..

     

    I'll try to explain

     

    Might be easier to see for yourself though

     

    www.bradleystokejudoclub.co.uk/test.php

     

    On that page I have listed title and subtitle from my database....

     

    I want to be able to click on title, and it take me to a new "page" where it shows title, subtitle, and article ...

     

    Does that make any sense??

     

    Thanks mate - I really appreciate your help :)

     

    Gem

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.