Loading ...
Sorry, an error occurred while loading the content.

RE: [php-objects] How to arrange image

Expand Messages
  • Ahsan Tohari
    Message 1 of 13 , Dec 31, 2009
    • 0 Attachment
      <?php
      include ("connect.php");// my database connect file
      $sql=mysql_query("select pictures from album where username='$username'");
      $i = 0;
      while($row=mysql_fetch_array($sql))
      {
      $imgsrc=$row[pictures];
      echo "<img src=$imgsrc height=150 width=150>";
      if ($i % 3 == 0) // 3 column (photos) per row, replace with desired number
      of column per row
      {
      echo "<p>";
      }
      $i++;
      }
      ?>


      _____

      From: php-objects@yahoogroups.com [mailto:php-objects@yahoogroups.com] On
      Behalf Of Gab Teo
      Sent: 31 Desember 2009 16:09
      To: php-objects@yahoogroups.com
      Subject: RE: [php-objects] How to arrange image





      Below is the script that echo out the photos,

      <?php



      include ("connect.php");// my database connect file

      $sql=mysql_query("select pictures from album where username='$username'");

      while($row=mysql_fetch_array($sql))

      {

      $imgsrc=$row[pictures];

      echo "<img src=$imgsrc height=150 width=150>";

      echo "<p>";

      }

      ?>

      I am currently having photos outputting in this form

      1

      2

      3

      4

      e.t.c

      and I want it in this form

      1 2 3

      4 5 6

      7 8 9

      e.t.c

      or

      1 2

      3 4

      5 6

      e.t.c

      Thanks,

      Gab
      --- On Wed, 12/30/09, Stan Rambin <serambin@ladatahost
      <mailto:serambin%40ladatahost.com> .com> wrote:

      From: Stan Rambin <serambin@ladatahost <mailto:serambin%40ladatahost.com>
      .com>
      Subject: RE: [php-objects] How to arrange image
      To: php-objects@ <mailto:php-objects%40yahoogroups.com> yahoogroups.com
      Date: Wednesday, December 30, 2009, 5:13 PM



      After reading the original e-mail, I checked and EW-3 SP1 had not installed

      on my 32bit Vista machine. I user automatic updates ans confirmed that my

      last update was 12/24/09. I then used the update feature manually and the

      patch installed fine. Just FYI.

      Thanks,

      Stan Rambin

      From: php-objects@ yahoogroups. com [mailto:php-objects@ yahoogroups. com]
      On

      Behalf Of Joe Forsythe

      Sent: Wednesday, December 30, 2009 9:06 AM

      To: php-objects@ yahoogroups. com

      Subject: Re: [php-objects] How to arrange image

      What is the code you're using right now so we can help you debug it?

      --

      Joe

      On Dec 30, 2009, at 3:49 AM, Gab Teo wrote:

      > Please can someone help, I just created a proile for users where

      > they can also upload their photo album, this is coming (outputing)

      > in one column and rows, and I want it to be in three column rows,

      > so that they can have their photos in three per column and as they

      > upload more photos it would be that this three column s maintain

      > down the rows. Can any one help me please.

      > Gab

      [Non-text portions of this message have been removed]

      [Non-text portions of this message have been removed]

      [Non-text portions of this message have been removed]






      [Non-text portions of this message have been removed]
    • Behn00sh MoshtaGH
      Hi if you enjoy to use *div *i suggest this:
      Message 2 of 13 , Jan 2, 2010
      • 0 Attachment
        Hi
        if you enjoy to use *div *i suggest this:

        <?php
        include ("connect.php");// my database connect file
        $sql=mysql_query("select pictures from album where username='$username'");
        while($row=mysql_fetch_array($sql))
        {

        $imgsrc=$row[pictures];
        echo "*<div class="picarea">*<img src=$imgsrc height=150 width=150>*</div>*
        ";
        echo "<p>";
        }

        ?>
        then in your CSS file add this class:
        .*picarea
        {
        float:left;
        width:50%;
        }
        *
        On Thu, Dec 31, 2009 at 12:38 PM, Gab Teo <doneatlast1000@...> wrote:

        >
        >
        >
        > Below is the script that echo out the photos,
        >
        > <?php
        >
        >
        >
        > include ("connect.php");// my database connect file
        >
        > $sql=mysql_query("select pictures from album where username='$username'");
        >
        > while($row=mysql_fetch_array($sql))
        >
        > {
        >
        > $imgsrc=$row[pictures];
        >
        > echo "<img src=$imgsrc height=150 width=150>";
        >
        > echo "<p>";
        >
        > }
        >
        > ?>
        >
        > I am currently having photos outputting in this form
        >
        > 1
        >
        > 2
        >
        > 3
        >
        > 4
        >
        > e.t.c
        >
        > and I want it in this form
        >
        > 1 2 3
        >
        > 4 5 6
        >
        > 7 8 9
        >
        > e.t.c
        >
        > or
        >
        > 1 2
        >
        > 3 4
        >
        > 5 6
        >
        > e.t.c
        >
        > Thanks,
        >
        > Gab
        > --- On Wed, 12/30/09, Stan Rambin <serambin@...<serambin%40ladatahost.com>>
        > wrote:
        >
        > From: Stan Rambin <serambin@... <serambin%40ladatahost.com>>
        > Subject: RE: [php-objects] How to arrange image
        > To: php-objects@yahoogroups.com <php-objects%40yahoogroups.com>
        > Date: Wednesday, December 30, 2009, 5:13 PM
        >
        >
        >
        > After reading the original e-mail, I checked and EW-3 SP1 had not installed
        >
        > on my 32bit Vista machine. I user automatic updates ans confirmed that my
        >
        > last update was 12/24/09. I then used the update feature manually and the
        >
        > patch installed fine. Just FYI.
        >
        > Thanks,
        >
        > Stan Rambin
        >
        > From: php-objects@ yahoogroups. com [mailto:php-objects@ yahoogroups. com]
        > On
        >
        > Behalf Of Joe Forsythe
        >
        > Sent: Wednesday, December 30, 2009 9:06 AM
        >
        > To: php-objects@ yahoogroups. com
        >
        > Subject: Re: [php-objects] How to arrange image
        >
        > What is the code you're using right now so we can help you debug it?
        >
        > --
        >
        > Joe
        >
        > On Dec 30, 2009, at 3:49 AM, Gab Teo wrote:
        >
        > > Please can someone help, I just created a proile for users where
        >
        > > they can also upload their photo album, this is coming (outputing)
        >
        > > in one column and rows, and I want it to be in three column rows,
        >
        > > so that they can have their photos in three per column and as they
        >
        > > upload more photos it would be that this three column s maintain
        >
        > > down the rows. Can any one help me please.
        >
        > > Gab
        >
        > [Non-text portions of this message have been removed]
        >
        > [Non-text portions of this message have been removed]
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >



        --

        Behn00sh Moshtagh
        --~--~---------~--~----~------------~-------~--~--


        [Non-text portions of this message have been removed]
      • Reji Jayan
        If i am right, i had read an old post for this. You can search google , how to display in rows an cols or something like this There is a lot of codes
        Message 3 of 13 , Jan 3, 2010
        • 0 Attachment
          If i am right, i had read an old post for this.

          You can search google ,

          "how to display in rows an cols" or something like this

          There is a lot of codes avaliable for this.

          No worries go ahead!!

          Thank You,

          Reji,
          PHP Developer.
          ==================



          --- On Wed, 30/12/09, Gab Teo <doneatlast1000@...> wrote:

          From: Gab Teo <doneatlast1000@...>
          Subject: [php-objects] How to arrange image
          To: php-objects@yahoogroups.com
          Date: Wednesday, 30 December, 2009, 3:19 PM







           









          Please can someone help, I just created a proile for users where they can also upload their photo album, this is coming (outputing) in one column and rows, and I want it to be in  three column rows, so that they can have their photos in three per column and as they upload more photos it would be that this three column s maintain down the rows. Can any one help me please.

          Gab



          [Non-text portions of this message have been removed]























          The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

          [Non-text portions of this message have been removed]
        • Reji Jayan
          Hello All, Can any suggest me a Open source package,  for e-commerce, which have facilites for gift cheques, wishlists etc. Thank You, Reji, PHP Developer.
          Message 4 of 13 , Jan 7, 2010
          • 0 Attachment
            Hello All,



            Can any suggest me a Open source package,  for e-commerce,



            which have facilites for gift cheques, wishlists etc.



            Thank You,



            Reji,

            PHP Developer.
            ===============================



            The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.