dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: displying all images which are selectes

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Posts
    2

    displying all images which are selectes

    i m going to selecting all images of step2.php when i selecting it shows me all but in step3.php it show me only 1 image. is the any problem with code




    Step2.php

    <div style="clear:both" id="images">
    <?php
    $imgSrc = mysql_query("SELECT * FROM camp_images WHERE camp_id='".$cobj->id."' ") or die(mysql_error());
    $totalImages = mysql_num_rows($imgSrc);
    if($totalImages<1){
    ?>
    <img src="images/DefaultVideoThumbnail.jpg" alt="" id="image" width="100" style="float:left;
    <?php if($cobj->pitch_media==0 || $cobj->pitch_media==1) echo 'display:none'; ?>">
    <?php
    }
    while($imageSrc = mysql_fetch_object($imgSrc)){
    ?>
    <img src="<?php echo $imageSrc->media_link?>" alt="" id="image" width="100" style="float:left;padding:2px;

    <?php if($cobj->pitch_media==0 || $cobj->pitch_media==1) echo 'display:none'; ?>">

    <?php
    }

    ?>
    </div>



    step3.php


    <?php if($cobj->media_link<2) echo '<img src="'.SITE_BASE.$cobj->media_link.'" alt="">';

    else if ($cobj->pitch_media<1)

  2. #2
    Join Date
    Sep 2013
    Posts
    221
    Well, i think you can try this using glob in your step3.php.
    Below is the code:

    $dirname = "media/images/iconized/";
    $images = glob($dirname."*.png");
    foreach($images as $image) {
    echo '<img src="'.$image.'" /><br />';
    }

    Hope this helps.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles