Jump to content

dragonstable

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Posts posted by dragonstable

  1. ok, basically i have a form which sends variables to the next page, but i need it so when a certain radio button is chosen, it actually sends more then 1 variable.

    basically people are getting the choice out of 3 items, and when they choose 1, a few variables have to be on the next page, any suggestions? or easy ways out? thanks
  2. <html>
    <head>
    <link rel="stylesheet" type="text/css" href="style.css"/>
    </head>
    <body>
    <?php
    include ("head.html");
    ?>
    <!-- Table for Main Body -->
    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td valign="top" align="left" width="91">
    <?php
    include ("menu.html");
    ?>
    </td>
    <td valign="top">


    <center><h2>
    <?php
    print "$username";
    ?>'s Inventory
    </center></h2>
    <br>

    <table align="center">
    <?php
    $dbh=mysql_connect ("********", "********", "********") or die ('I cannot connect to the database because: '

    . mysql_error());
    mysql_select_db ("dragonst_users");
    $data = mysql_query("SELECT * FROM items WHERE user='$username'")
    or die(mysql_error());
    while($info = mysql_fetch_array( $data ))
    {
    Print '<td width="20%">';
    Print "<center> ".$info['itemname'] . " <br>";
    Print "<img src=http://dragonstable.fileplace.biz/".$info['image'] ."> <br>";
    Print " ".$info['rarity'] . "</center></td>";
    }
    Echo '</table>';
    ?>


    <br> <br>

    </td>
    <td width="1" valign="top"> </td>
    </tr></table>

    </body></html>



    Basically thats my code i have at the moment, What i want it to do is show 5 entries from the array in the first row of the table, and then the next 5 entries in the next row and so on, so that way it doesnt scroll across the screen and keep going...

    Please help, thanks in advance...
  3. $data = mysql_query("SELECT * FROM items WHERE user='$username'")
    or die(mysql_error());
    while($info = mysql_fetch_array( $data ))
    {
    Print "<center> ".$info['itemname'] . " <br>";
    Echo "<img src=http://dragonstable.fileplace.biz/".$info['image'] ."> <br>";
    Print " ".$info['rarity'] . "</center><br> ";
    }
    ?>




    thats my current script just after connecting, it works but shows each of the items one under the other and in the centre of the page... Is there a way I can make it go about 4 wide and then down to the next line and repeat, and then only show the first 50 items? Please help me if any of this makes sense to you... Thanks
×
×
  • 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.