Page 1 of 1

stupid problem

Posted: Fri Jul 15, 2005 7:32 am
by shiznatix
this really is not a big deal at all but i cant seam to figure it out. what i want is for there to be a table with 4 < td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i < 4)
            {
                ?>
                <td width="25%" align="center">
                  <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                  <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                  <br>
                  <a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
                </td>
                <?
            }
            else
            {
                ?>
                </tr>
                <tr>
                  <td width="25%" align="center">
                    <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                    <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                    <br>
                    <a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
                  </td>
                <?
                $i=0;
            }
        }
    }
    ?>
      </tr>
    </table>
eam to figure it out. what i want is for there to be a table with 4 < td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

&lt;table border=&quote;0&quote;&gt;
      &lt;tr&gt;
    &lt;?
    $dir = opendir('./users/'.$_SESSION&#1111;'username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; strpos($file, '.thumbnail') === false &amp;&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &lt;br&gt;
                    &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                  &lt;/td&gt; there to be a table with 4 < td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border=&quote;0&quote;&gt;
      &lt;tr&gt;
    &lt;?
    $dir = opendir('./users/'.$_SESSION&#1111;'username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; strpos($file, '.thumbnail') === false &amp;&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &lt;br&gt;
                    &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;n the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

&lt;table border=&quote;0&quote;&gt;
      &lt;tr&gt;
    &lt;?
    $dir = opendir('./users/'.$_SESSION&#1111;'username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; strpos($file, '.thumbnail') === false &amp;&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &lt;br&gt;
                    &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/alt; td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; strpos($file, '.thumbnail') === false &amp;&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&a a big deal at all but i cant seam to figure it out. what i want is for there to be a table with 4 < td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

&lt;table border=&quote;0&quote;&gt;
      &lt;tr&gt;
    &lt;?
    $dir = opendir('./users/'.$_SESSION&#1111;'username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; strpos($file, '.thumbnail') === false &amp;&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &lt;br&gt;
                    &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                  &lt;/td&gt;
                &lt;?
                $i=0;
            }
        }
    }
    ?&gt;
      &lt;/tr&am a big deal at all but i cant seam to figure it out. what i want is for there to be a table with 4 < td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i < 4)
            {
                ?>
                <td width="25%" align="center">
                  <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                  <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &ample = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i < 4)
            {
                ?>
                <td width="25%" align="center">
                  <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                  <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                  <br>
                  <a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
                </td>
                <?
            }
            else
            {
                ?>
                </tr>
                <tr>
                  <td width="25%" align="center">
                    <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                    <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                    <br>
                    <a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
                  </td>
                <?
                $i=0;
            }
        }
    }
    ?>
      </tr>
    </table>
mp;amp; strpos($file, '.center') === false)
{
$i++;

if ($i < 4)
{
?>
<td width="25%" align="center">
<a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank&quote;&gt;
&lt;img src=&quote;./users/&lt;?= $_SESSIONї'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
&lt;br&gt;
&lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSIONї'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
&lt;/td&gt;
&ar there to be a table with 4 < td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false &&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img ith 4 < td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr&gt;
    &lt;?
    $dir = opendir('./users/'.$_SESSION&#1111;'username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; strpos($file, '.thumbnail') === false &amp;&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &lt;br&gt;
                    &lt;a hreigure it out. what i want is for there to be a table with 4 < td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      &lt;tr&gt;
    &lt;?
    $dir = opendir('./users/'.$_SESSION&#1111;'username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i < 4)
            {
                ?>
                <td width="25%" align="center">
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
              is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0"&gt;
      &lt;tr&gt;
    &lt;?
    $dir = opendir('./users/'.$_SESSION&#1111;'username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; strpos($file, '.thumbnail') === false &amp;&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &lt;br&gt;
                    &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                  &lt;/td&gt;
                &lt;?
                $i=0;
            }
        }
    }
    ?&gt;
      &at wrong.

Code: Select all

<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &ampt all but i cant seam to figure it out. what i want is for there to be a table with 4 < td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i < 4)
            {
                ?>
                <td width="25%" align="center">
                  <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                  <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                  <br>
                  <a href="index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#111st one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i < 4)
            {
                ?>
                <td width="25%" align="center">
                  <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                  <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                  <br>
                  <a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
                </td>
                <?
            }
            else
            {
                ?>
                </tr>
                <tr>
                  <td width="25%" align="center">
                    <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                    <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                    <br>
                    <a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
                  </td>
                <?
                $i=0;
            }
        }
    }
    ?>
      </tr>
    </table&ampc6207]
<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i < 4)
            {
                ?>
                <td width="25%" align="center">
                  <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                  <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                  <br>
                  <a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
                </td>
                <?
            }
            else
            {
                ?>
                </tr>
                <tr>
                  <td width="25%" align="center">
                    <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                    <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                    <br>
                    <a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
                  </td>
                <?
                $i=0;
            }
        }
    }
    ?>
      </tr>
    </table>
amp;& strpos($file, '.featured') === false && strpos($file, '.center') === false)
{
$i++;

if ($i < 4)
{
?>
<td width="25%" align="center">
<a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
<img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
<br>
<a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
</td>
<?
}
else
{
?>
</tr>
<tr>
<td width="25%" align="center">
<a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
<img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
<br>
<a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
</td>
<?
he code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr&gt;
    &lt;?
    $dir = opendir('./users/'.$_SESSION&#1111;'username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; strpos($file, '.thumbnail') === false &amp;&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &lt;br&gt;
                    &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                  &lt;/td&gt;
 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &lt;br&gt;
                    &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i < 4)
            {
                ?>
                <td width="25%" align="center">
                  <a href="./users/<?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
          a big deal at all but i cant seam to figure it out. what i want is for there to be a table with 4 < td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border=&quote;0&quote;&gt;
      &lt;tr&gt;
    &lt;?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &lt;br&gt;
                    &lt;a href=&quote;index2.php?u=profile&ampmp;quote;>
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i < 4)
            {
                ?>
                <td width="25%" align="center">
                  <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                  <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                  <br>
                  <a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
                </td>
                <?
            }
            else
            {
                ?>
                </tr>
                <tr>
                  <td width="25%" align="center">
                    <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                    <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                    <br>
                    &lt;a href=&quote;index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
                  </td& seam to figure it out. what i want is for there to be a table with 4 < td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

&lt;table border=&quote;0&quote;&gt;
      &lt;tr&gt;
    &lt;?
    $dir = opendir('./users/'.$_SESSION&#1111;'username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; strpos($file, '.thumbnail') === false &amp;&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &lt;br&gt;
                    &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                  &lt;/td&gt;
                &lt;?
                $i=0;
            }
        }
    }
    ?&gt;
      &lt;/tr&amis a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i < 4)
            {
                ?>
                <td width="25%" align="center">
                  <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                  <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                  <br>
                  <a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
                </td>
                <?
            }
            else
            {
                ?>
                </tr>
                <tr>
                  <td width="25%" align="center">
                    <a href="./users/<?= $_SESSION['username'] ?>/<?= $file ?>" target="_blank">
                    <img src="./users/<?= $_SESSION['username'] ?>/<?= $file ?>.thumbnail"></a>
                    <br>
                    <a href="index2.php?u=profile&op=del&pic=<?= $_SESSION['username'].'/'.$file ?>">Delete</a>
                  </td>
                <?
                $i=0;
            }
        }
    }
    ?>
      </tr>
    </table>
nt seam to figure it out. what i want is for there to be a table with 4 < td > 's in the < tr > (i cant remember what is a row and what is a col). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr&gt;
    &lt;?
    $dir = opendir('./users/'.$_SESSION&#1111;'username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; strpos($file, '.thumbnail') === false &amp;&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &lt;br&gt;
                    &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&ar every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false &&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gtl). the code i have works for every row(?) but the first one where it only shows 3 pictures but the rest show 4. here is my code maybe u will see where i went wrong.

Code: Select all

<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION&#1111;'username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' &amp;&amp; $file != '..' &amp;&amp; strpos($file, '.thumbnail') === false &amp;&amp; strpos($file, '.featured') === false &amp;&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &lt;br&gt;
                    &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                  &lt;/td&gt;
                &lt;?
                $i=0;
            }
        }
    }
    ?&gt;
p;amp;gt;
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION&#1111;'username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false &&amp; strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                  &lt;br&gt;
                  &lt;a href=&quote;index2.php?u=profile&amp;op=del&amp;pic=&lt;?= $_SESSION&#1111;'username'].'/'.$file ?&gt;&quote;&gt;Delete&lt;/a&gt;
                &lt;/td&gt;
                &lt;?
            }
            else
            {
                ?&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                  &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                    &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                    &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;.thumbnail&quote;&gt;&lt;/a&gt;
                    &are i went wrong.

Code: Select all

<table border="0">
      <tr>
    <?
    $dir = opendir('./users/'.$_SESSION['username'].'');

    $i=0;

    while (false !== ($file = readdir($dir)))
    {
        if ($file != '.' && $file != '..' && strpos($file, '.thumbnail') === false && strpos($file, '.featured') === false && strpos($file, '.center') === false)
        {
            $i++;

            if ($i &lt; 4)
            {
                ?&gt;
                &lt;td width=&quote;25%&quote; align=&quote;center&quote;&gt;
                  &lt;a href=&quote;./users/&lt;?= $_SESSION&#1111;'username'] ?&gt;/&lt;?= $file ?&gt;&quote; target=&quote;_blank&quote;&gt;
                  &lt;img src=&quote;./users/&lt;?= $_SESSION&#1111;'username']

Posted: Fri Jul 15, 2005 12:37 pm
by s.dot
try this simple code

Code: Select all

<?
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
  <tr>
<?
while(false !== ($file = readdir($dir)))
{
	if($cell == 4)
	{
		$cell = 1;
		echo "</tr>";
		echo "<tr>";
	}
	echo "<td>";
	echo "table cell contents";
	echo "</td>";
	$cell++;
} ?>
  </tr>
</table>
This will produce a table that has 4 table cells per table rowamp;lt;?
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo &quote;&lt;/tr&gt;&quote;;
echo &quote;&lt;tr&gt;&quote;;
}
echo &quote;&lt;td&gt;&quote;;
echo &quote;table cell contents&quote;;
echo &quote;&lt;/td&aSSION['username'].'');
$cell = 0; ?>
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo &quote;&lt;/tr&gt;&quote;;
echo "<tr>";
}
echo "&lt;td&gt;;
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo &quote;&lt;tr&gt;&quote;;
}
echo &quote;&lt;td&gt;&quote;;
echo &quote;table cell cll = 0; ?>
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>
[/php:1:de

Code: Select all

<?
$dir = opendir('./users/'.$_SESSION&#1111;'username'].'');
$cell = 0; ?&gt;
&lt;table&gt;
  &lt;tr&gt;
&lt;?
while(false !== ($file = readdir($dir)))
{
	if($cell == 4)
	{
		$cell = 1;
		echo &quote;&lt;/tr&gt;&quote;;
		echo &quote;&lt;tr&gt;&quote;;
	}
	echo &quote;&lt;td&gt;&quote;;
	echo &quote;table cell contents&quote;;
	echo &quote;&lt;/td&gt;&quote;;
	$cell++;
} ?&gt;
  &lt;/tr&gt;
&lt;/table&gt;
Thde

Code: Select all

<?
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
  <tr>
<?
while(false !== ($file = readdir($dir)))
{
	if($cell == 4)
	{
		$cell = 1;
		echo "</tr>";
		echo "<tr>";
	}
	echo "<td>";
	echo "table cell contents";
	echo "</td>";
	$cell++;
} ?>
  </tr>
</table>
This will produce a table that has 4 table cells per table rowp;lt;/tr>
</table>


This will produce a table that has 4 table cells per table rowESSION['username'].'');
$cell = 0; ?>
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table row].'');
$cell = 0; ?>
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo &quote;&lt;/tr&gt;";
echo "<tr>";
}
echo "<td>";
echo &
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>&quote;;
echo &quote;table cell contents&quote;;
echo &quote;&lt;/td&gt;&quote;;
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowp;amp;lt;?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td&gt;&quote;;
echo &quote;table cell contents&quote;;
echo &quote;&lt;/td&gt;&quote;;
$cell++;
} ?&gt;
&lt;/tr&gt;
&lt;/table&gt;
[/phpuote;<tr>";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowc9246ed49a]
<?
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table row$cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo &quote;&lt;td&gt;&quote;;
echo &quote;table cell contents&quote;;
echo &quote;&lt;/td&gt;&quote;;
$cell++;
} ?&gt;
&lt;/tr&gt;
&lt;/table&gt;


This will produce a table that has 4 taamp;gt;";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowwhile(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>";
echo &quote;table cell contents&quote;;
echo &quote;&lt;/td&am 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowll++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowde

Code: Select all

<?
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
  <tr>
<?
while(false !== ($file = readdir($dir)))
{
	if($cell == 4)
	{
		$cell = 1;
		echo "</tr>";
		echo "<tr>";
	}
	echo "<td>";
	echo "table cell contents";
	echo "</td>";
	$cell++;
} ?>
  </tr>
</table>
This will produce a table that has 4 table cells per table rowamp;lt;td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowp;amp;lt;?
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo &quote;&lt;/tr&gt;&quote;;
echo &quote;&lt;tr&gt;&quote;;
}
echo &quote;&lt;td&gt;&quote;;
echo &quote;table cell contents&quote;;
echo &quote;&lt;/td&gt;&quote;;
$cell++;
} ?&gt;
&lt;/tr&gt;
&lt;/table&gt;


Thr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowamp;lt;?
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>";
echo &quote;table cell content= readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>";
echo "table cell contents";
echo "</td>&quote;;
$cell++;
} ?&gt;
&lt;/tr&gt;
&lt;/table&gt;


This will produce a table that has 4 table cells per table rowt;?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>";
echo "table cell contents";
echo &quote;&lt;/td&gt;&quote;;
$cell++;
} ?&gt;
&lt;/tr&gt;
&lt;/table&gp;amp;gt;";
echo "table cell contents";
echo "</td&gt;&quote;;
$cell++;
} ?&gt;
&lt;/tr&gt;
&lt;/table>


This will produce a table that has 4 table cells per table rowo "<tr>";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowname'].'');
$cell = 0; ?>
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table row246ed49a]
<?
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
<tr&gt;
&lt;?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo &quote;</tr>";
echo "<tr>";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowt;";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr&gt;
&lt;/table&gt;


This will produce a table that has 4 table cells per table rowde

Code: Select all

<?
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
  <tr>
<?
while(false !== ($file = readdir($dir)))
{
	if($cell == 4)
	{
		$cell = 1;
		echo "</tr>";
		echo "<tr>";
	}
	echo "<td>";
	echo "table cell contents";
	echo "</td>";
	$cell++;
} ?>
  </tr>
</table>
[/php:1:p;lt;?
while(false !== ($file = readdir($dir)))
{
	if($cell == 4)
	{
		$cell = 1;
		echo "</tr>";
		echo "<tr>";
	}
	echo "<td>endir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
  <tr>
<?
while(false !== ($file = readdir($dir)))
{
	if($cell == 4)
	{
		$cell = 1;
		echo "</tr>";
		echo "<tr>";
	}
	echo "<td>";
	echo "table cell contents";
	echo "</td>";
	$cell++;
} ?>
  </tr>
</table>
This will produce a table that has 4 table cells per table roamp;lt;tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo &quote;&lt;/tr&gt;&quote;;
echo &quote;&lt;tr&gt;&quote;;
}
echo &quote;&lt;td&gt;&quote;;
echo &quote;table cell contents&quote;;
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowde

Code: Select all

<?
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
  <tr>
<?
while(false !== ($file = readdir($dir)))
{
	if($cell == 4)
	{
		$cell = 1;
		echo "</tr>";
		echo "<tr>";
	}
	echo "<td>";
	echo "table cell contents";
	echo "</td>";
	$cell++;
} ?&mp;amp;gt;
<?
while(false !== ($file = readdir($dir)))
{
	if($cell == 4)
	{
		$cell = 1;
		echo "</tr>";
		echo "<tr>";
	}
	echo "<td>";
	echo "table cell contents";
	echo "</td>";
	$cell++;
} ?>
  </tr>
</table>
This will produce a table that has 4 table cells per table rowe>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "&lt;tr&gt;&quote;;
}
echo &quote;&lt;td&gt;&quote;;
echo &quote;table cell contents&quote;;
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowt;
</tr>
</table>


This will produce a table that has 4 table cells per table rowuote;;
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowmp;amp;lt;tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table rowde

Code: Select all

<?
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
  <tr>
<?
while(false !== ($file = readdir($dir)))
{
	if($cell == 4)
	{
		$cell = 1;
		echo "</tr>";
		echo "<tr>";
	}
	echo "<td>";
	echo "table cell contents";
	echo "</td>";
	$cell++;
} ?>
  </tr>
</table>
This will produce a table that has/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>&q
<?
$dir = opendir('./users/'.$_SESSION['username'].'');
$cell = 0; ?>
<table>
<tr>
<?
while(false !== ($file = readdir($dir)))
{
if($cell == 4)
{
$cell = 1;
echo "</tr>";
echo "<tr>";
}
echo "<td>";
echo "table cell contents";
echo "</td>";
$cell++;
} ?>
</tr>
</table>


This will produce a table that has 4 table cells per table row