Announcement

Collapse
No announcement yet.

See actual image from db

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • icemanmx
    replied
    Originally posted by Wayne Luke View Post
    You wouldn't include the doctype, html, head, or body HTML tags. A page can only have one set of each of these and these are already included by standard vBulletin output.

    On the PHP side, you wouldn't include the <?php tag. Are you sure that it is including the connect.php file? You probably need a path here so it can be found in the file system. It should not be in a web accessible directory. I am pretty sure that errors are hidden in modules just to make pages work better. Finally, you're also not buffering your output and flushing it at the end of the loop.
    I will later tonight try to geth this going, i will keep you updated...

    Icemanmx

    Leave a comment:


  • Wayne Luke
    replied
    You wouldn't include the doctype, html, head, or body HTML tags. A page can only have one set of each of these and these are already included by standard vBulletin output.

    On the PHP side, you wouldn't include the <?php tag. Are you sure that it is including the connect.php file? You probably need a path here so it can be found in the file system. It should not be in a web accessible directory. I am pretty sure that errors are hidden in modules just to make pages work better. Finally, you're also not buffering your output and flushing it at the end of the loop.

    Leave a comment:


  • icemanmx
    replied
    Originally posted by Wayne Luke View Post
    The example was meant as a base concept. You should know HTML and PHP if you want to build something that is actually usable on a site.

    height and width on images should be specified in CSS. Most likely some other CSS is conflicting with your desires.
    Hello
    I know html and was truing this in the php module but it does not function:

    PHP Code:

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    </head>

    <body>

        <!--<a href="form.php">Add entry</a><br>-->
    <br>

    <?php
    /// In order to use this script freely
    /// you must leave the following copyright
    /// information in this file:
    /// Copyright 2018 www.nbi19.com
    /// Norrbotten Brigaden [-I19-] World of Tanks
    /// All rights reserved.

    include("connect.php");


    $result_mlti $conn->query("SELECT * FROM tier_1 ");
    $num $result_mlti->num_rows;

    if (
    $num ) {
    while(
    $row_mlti $result_mlti->fetch_assoc()) {

        
    $id $row_mlti["id"];
        
    $name stripslashes($row_mlti["name"]);
        
    $gift stripslashes($row_mlti["gift"]);
        
    $description stripslashes($row_mlti["description"]);
        
    $nation stripslashes($row_mlti["nation"]);
        
    $premium stripslashes($row_mlti["premium"]);
        
    $img_small stripslashes($row_mlti["img_small"]);
        
    $img_contour stripslashes($row_mlti["img_contour"]);
        
    $img_big stripslashes($row_mlti["img_big"]);
        
    $type stripslashes($row_mlti["type"]);
        
    $v_name stripslashes($row_mlti["v_name"]);

        
    $row .= '<tr>
        <td><a href="form.php?id='
    .$id.'">'.$id.'</a></td>
        <td>'
    .$name.'</td>
        <td>'
    .$v_name.'</td>
        <td>'
    .$nation.'</td>
        <td><img src="'
    .$img_small.'" alt="'.$v_name.'" title="'.$v_name.'" width="124" height="31"/></td>
        <td><img src="'
    .$img_big.'" alt="'.$v_name.'" title="'.$v_name.'"/></td>
        <td><img src="'
    .$img_contour.'" alt="'.$v_name.'" title="'.$v_name.'"/></td>
        <td><a href="process.php?del_id='
    .$id.'">Delete</a></td>

        </tr>'
    ;


    ++
    $i; }} else { $row '<tr><td colspan="2" align="center">Nothing found</td></tr>'; }

    $conn->close();
    ?>
    <table border="1" cellpadding="1" cellspacing="0"><?php echo $row ?></table>

    </body>
    </html>
    So how can i make this function?
    https://nbi19.com/wot-tier1

    Thanks
    Icemanmx

    Leave a comment:


  • Wayne Luke
    replied
    The example was meant as a base concept. You should know HTML and PHP if you want to build something that is actually usable on a site.

    height and width on images should be specified in CSS. Most likely some other CSS is conflicting with your desires.

    Leave a comment:


  • icemanmx
    started a topic See actual image from db

    See actual image from db

    Hello
    From this topic https://www.vbulletin.com/forum/blog...se#post4404203 i want to have help how i see the actual image from my data base.

    I want to make so i can see an image also, <img src="test.jpg" alt="test"/>. So how do i parse img tag around $product['img_big'] ?


    Ok, found a solution: , '<img src="'.$product["img_big"].'" height="100px" width="160px">'
    The problem it is not respecting the height and width... it gives me this: 160px × 100px (scaled to 68px × 43px) in the vbulletin5, any idea how to change that?


    Thanks in advance
    Icemanmx
    Last edited by icemanmx; Wed 2 Jan '19, 5:39pm.

Related Topics

Collapse

Working...
X