Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: images on file extentions... Need help!

  1. #11
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Can you post the full code your using to produce that?

  2. #12
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    PHP Code:
    <?php 
    include('db_conn.php');

    $queryget mysql_query("SELECT * FROM xxx ORDER BY `date` LIMIT 3") or die("Error with query");
    while (
    $row mysql_fetch_array($queryget)) 

        
    $name $row['name']; 
        
    $type $row['type']; 
        
    $nick $row['nick']; 
       
    $format $row['format'];
    $filename $row['filename'];
    $date $row['date'];    
       
        
        
        
        echo 

        <table width='120px';>     
            <tr>
            <td>
            &nbsp;<img src='redirect_upload/
    $format' width='80px' height='70px' border='0'>
            <font size='0.8' face='Verdana' color='blue'><b>
            Pavadinimas:&nbsp; 
    $name <br>
            Idejo:&nbsp;&nbsp; 
    $nick       <br>                            
            Data:&nbsp;&nbsp;&nbsp; 
    $date  <br>
            Rusis:&nbsp;&nbsp; 
    $type
            </b></font>
            </td>
            </tr>
        </table> 
        "
    ;     

    ?>

  3. #13
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    To clarify, your issue is that you want to see:

    And not:
    Jeremy | jfein.net

  4. #14
    Join Date
    Jul 2009
    Location
    Coquitlam BC Canada
    Posts
    46
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    Remove all of the <br>'s

  5. #15
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Try this:

    Code:
    <?php 
    include('db_conn.php');
    
    $queryget = mysql_query("SELECT * FROM xxx ORDER BY `date` LIMIT 3") or die("Error with query");
    
    $count = 0;
    ?>
    <table width="120px">
     <tr>
    <?php   
    while ($row = mysql_fetch_array($queryget)) { 
    
    /* I am not getting rid of these assigned variables just in case you use them later in the script */
        $name = $row['name']; 
        $type = $row['type']; 
        $nick = $row['nick']; 
        $format = $row['format'];
        $filename = $row['filename'];
        $date = $row['date'];    
    ?> 
      <td>
       &nbsp;<img src='redirect_upload/<?php echo $row['format'];?>' width='80px' height='70px' border='0'>
        <font size='0.8' face='Verdana' color='blue'><b>
        Pavadinimas:&nbsp; <?php echo $row['name'];?> <br>
        Idejo:&nbsp;&nbsp; <?php echo $row['nick'];?>       <br>                            
        Data:&nbsp;&nbsp;&nbsp; <?php echo $row['date'];?>  <br>
        Rusis:&nbsp;&nbsp; <?php echo $row['type']; ?>
        </b></font>
       </td>
    <?php
    
     echo ($count % 3) ? '</tr><tr>' : '';
    
     $count++;
    } 
    ?> 
     </tr>
    </table>
    Change the number in red above to however many images you want to display across. The above is not tested, but should work.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. The Following User Says Thank You to thetestingsite For This Useful Post:

    auriaks (11-11-2009)

  7. #16
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    @fg123

    <br>'s just manage looking of my image and text, but everything is in while and it will do 3 times. you cant change the way how they will look in webpage by deleting <br>'s
    Last edited by auriaks; 11-10-2009 at 06:19 PM.

  8. #17
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Auriak, please take a look at mine and thetestingsite's posts above.
    Jeremy | jfein.net

  9. #18
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    it works! THANKS

Bookmarks

Posting Permissions

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