Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 40

Thread: php with css..

  1. #21
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    that is the hole code.i have a while loop on every image cause they all have there respected area.

    i did it cause i have no clue how to do the css part of it cause im using php to extract the image name from my database.i was using

    PHP Code:
    <?php
    // database connect script. 

    mysql_connect("localhost""techker_techker""techker") or die(mysql_error()) ;
    mysql_select_db("techker_softcore") or die(mysql_error()) ;

    $fileSQL=" SELECT *
    FROM featured WHERE location=1
    "
    ;
    $fileLIST=mysql_query($fileSQL);

    $fileSQL2=" SELECT *
    FROM featured WHERE location=2
    "
    ;
    $fileLIST2=mysql_query($fileSQL2);

    $fileSQL3=" SELECT *
    FROM featured WHERE location=3
    "
    ;
    $fileLIST3=mysql_query($fileSQL3);

    $fileSQL4=" SELECT *
    FROM featured WHERE location=4"
    ;
    $fileLIST4=mysql_query($fileSQL4);

    $fileSQL5=" SELECT *
    FROM featured WHERE location=5
    "
    ;
    $fileLIST5=mysql_query($fileSQL5);

    $fileSQL6=" SELECT *
    FROM featured WHERE location=6
    "
    ;
    $fileLIST6=mysql_query($fileSQL6);

    $fileSQL7=" SELECT *
    FROM featured WHERE location=7
    "
    ;
    $fileLIST7=mysql_query($fileSQL7);

    $fileSQL8=" SELECT *
    FROM featured WHERE location=8
    "
    ;
    $fileLIST8=mysql_query($fileSQL8);

    $fileSQL9=" SELECT *
    FROM featured WHERE location=9
    "
    ;
    $fileLIST9=mysql_query($fileSQL9);


    ?>



    <html>
    <head>
    <title>index</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    body {
        background-color: #CCCCCC;
    }
    -->
    </style></head>
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <!-- ImageReady Slices (index.psd) -->
    <table width="900" height="901" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
    <tr>
            <td colspan="5">
                <img src="images/main_01.jpg" width="900" height="15" alt=""></td>
        </tr>
        <tr>
            <td colspan="2" rowspan="4">
                <img src="images/main_02.jpg" width="591" height="376" alt=""></td>
            <td colspan="2">
                <img src="images/main_03.jpg" width="300" height="57" alt=""></td>
            <td rowspan="6">
                <img src="images/main_04.jpg" width="9" height="885" alt=""></td>
        </tr>
        <tr>
            <td colspan="2">
                <img src="images/main_05.jpg" width="300" height="49" alt=""></td>
        </tr>
        <tr>
            <td colspan="2">
                <img src="images/main_06.jpg" width="300" height="51" alt=""></td>
        </tr>
        <tr>
            <td colspan="2">
                <img src="images/main_07.jpg" width="300" height="219" alt=""></td>
        </tr>
        <tr>
            <td rowspan="2">
                <img src="images/main_08.jpg" width="378" height="509" alt=""></td>
            <td colspan="2"><table width="502" height="416" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <th width="501" height="416" valign="top" background="images/main_09.jpg" scope="row"><table width="502" height="415" border="0" cellpadding="0" cellspacing="0">
                  <tr><? while ($row = @mysql_fetch_assoc($fileLIST)) { ?>
                    <th width="166" valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row['pic'] .'" target="_blank" >
    <img src="/admin/art/'
    .$row['pic'].'" border="0" alt="" width=65/>
    </a>
    <br />'
    ?></th><? while ($row2 = @mysql_fetch_assoc($fileLIST2)) { ?>
                    <th width="183" valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row2['pic'] .'" target="_blank" >
    <img src="/admin/art/'
    .$row2['pic'].'" border="0" alt="" width=65/>
    </a>
    <br />'
    ?></th><? while ($row3 = @mysql_fetch_assoc($fileLIST3)) { ?>
                    <th width="153" valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row3['pic'] .'" target="_blank" >
    <img src="/admin/art/'
    .$row3['pic'].'" border="0" alt="" width=65/>
    </a>
    <br />'
    ?></th>
                  </tr>
                  <tr><? while ($row4 = @mysql_fetch_assoc($fileLIST4)) { ?>
                    <th valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row4['pic'] .'" target="_blank" >
    <img src="/admin/art/'
    .$row4['pic'].'" border="0" alt="" width=65/>
    </a>
    <br />'
    ?></th><? while ($row5 = @mysql_fetch_assoc($fileLIST5)) { ?>
                    <th valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row5['pic'] .'" target="_blank" >
    <img src="/admin/art/'
    .$row5['pic'].'" border="0" alt="" width=65/>
    </a>
    <br />'
    ?></th><? while ($row6 = @mysql_fetch_assoc($fileLIST6)) { ?>
                    <th valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row6['pic'] .'" target="_blank" >
    <img src="/admin/art/'
    .$row6['pic'].'" border="0" alt="" width=65/>
    </a>
    <br />'
    ?></th>
                  </tr>
                  <tr><? while ($row7 = @mysql_fetch_assoc($fileLIST7)) { ?>
                    <th valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row7['pic'] .'" target="_blank" >
    <img src="/admin/art/'
    .$row7['pic'].'" border="0" alt="" width=65/>
    </a>
    <br />'
    ?></th><? while ($row8 = @mysql_fetch_assoc($fileLIST8)) { ?>
                    <th valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row8['pic'] .'" target="_blank" >
    <img src="/admin/art/'
    .$row8['pic'].'" border="0" alt="" width=65/>
    </a>
    <br />'
    ?></th><? while ($row9 = @mysql_fetch_assoc($fileLIST9)) { ?>
                    <th valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row9['pic'] .'" target="_blank">
    <img src="/admin/art/'
    .$row9['pic'].'" border="0" alt="" width=65/>
    </a>
    <br />'
    ?></th>
                  </tr>
                  <? } } } } } } } } }  ?>
                </table></th>
              </tr>
            </table></td>
      <td rowspan="2">
                <img src="images/main_10.jpg" width="11" height="509" alt=""></td>
        </tr>
        <tr>
            <td colspan="2">
                <img src="images/main_11.jpg" width="502" height="93" alt=""></td>
        </tr>
        <tr>
            <td>
                <img src="images/spacer.gif" width="378" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="213" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="289" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="11" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="9" height="1" alt=""></td>
        </tr>
    </table>
    <!-- End ImageReady Slices -->
    </body>
    </html>

    the echo '<a href="/admin/art/'.$row9['pic'] .'" target="_blank">
    <img src="/admin/art/'.$row9['pic'].'" border="0" alt="" width=65/>
    </a>
    <br />';

    just gets the pics name in that table

    if i new how to do it so the pics can show like i want

    i would just do one query that gets all the names and echos it.but that gives me all the pics on one line or vertical not

    pic pic pic

    pic pic pic

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

    Default

    Code:
     <div id="limitor"> <th width="166" valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row['pic'] .'" target="_blank" >
    <img src="/admin/art/'.$row['pic'].'" border="0" alt="" width=65/>
    </a>
    '; ?></th><? while ($row2 = @mysql_fetch_assoc($fileLIST2)) { ?>
                    <th width="183" valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row2['pic'] .'" target="_blank" >
    <img src="/admin/art/'.$row2['pic'].'" border="0" alt="" width=65/>
    </a>
    '; ?></th><? while ($row3 = @mysql_fetch_assoc($fileLIST3)) { ?>
                    <th width="153" valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row3['pic'] .'" target="_blank" >
    <img src="/admin/art/'.$row3['pic'].'" border="0" alt="" width=65/>
    </a>'; ?></th>
                  </tr>
                  <tr><? while ($row4 = @mysql_fetch_assoc($fileLIST4)) { ?>
                    <th valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row4['pic'] .'" target="_blank" >
    <img src="/admin/art/'.$row4['pic'].'" border="0" alt="" width=65/>
    </a>
    '; ?></th><? while ($row5 = @mysql_fetch_assoc($fileLIST5)) { ?>
                    <th valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row5['pic'] .'" target="_blank" >
    <img src="/admin/art/'.$row5['pic'].'" border="0" alt="" width=65/>
    </a>
    '; ?></th><? while ($row6 = @mysql_fetch_assoc($fileLIST6)) { ?>
                    <th valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row6['pic'] .'" target="_blank" >
    <img src="/admin/art/'.$row6['pic'].'" border="0" alt="" width=65/>
    </a>
    '; ?></th>
                  </tr>
                  <tr><? while ($row7 = @mysql_fetch_assoc($fileLIST7)) { ?>
                    <th valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row7['pic'] .'" target="_blank" >
    <img src="/admin/art/'.$row7['pic'].'" border="0" alt="" width=65/>
    </a>
    '; ?></th><? while ($row8 = @mysql_fetch_assoc($fileLIST8)) { ?>
                    <th valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row8['pic'] .'" target="_blank" >
    <img src="/admin/art/'.$row8['pic'].'" border="0" alt="" width=65/>
    </a>
    '; ?></th><? while ($row9 = @mysql_fetch_assoc($fileLIST9)) { ?>
                    <th valign="top" scope="row"><?php echo '<a href="/admin/art/'.$row9['pic'] .'" target="_blank">
    <img src="/admin/art/'.$row9['pic'].'" border="0" alt="" width=65/>
    </a>
    '; ?></th>
                  </tr>
                  <? } } } } } } } } }  ?>
                </table></th></div>
    No line breaks and the limitor placed in the correct place

  3. #23
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    it still mess up the hole page...

  4. #24
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    I've started for you so you would see what I mean, download the page and the image:

    Attachment 2321 This is the background image, I made it from your pieces
    Attachment 2322 This is the page, remove the .txt suffix and try it out

    Save both files and take a look at them. This is much easier to edit, and is read quicker by the browser.
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

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

    Default

    You didn't do what I said. I said put the limitor in once, not at every image. But that is still a test and would probably need some work so go with snookerman's.

  6. #26
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    i get what you did.the only thing is the code im using is php.you have all the images .

    i need to include my while and the code.as soon as i replace the html for php it screws up the page?

    by the whay thx alot for the help!!really appreaciated,.

  7. #27
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by bluewalrus View Post
    You didn't do what I said. I said put the limitor in once, not at every image. But that is still a test and would probably need some work so go with snookerman's.
    it is put once.look at the top and i close the div at the end

  8. #28
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    I see that DD chopped a few pixels off the pic I attached. It would be good if you could find the original background picture, without the black border and put it on your server and post the link so I can refer to it in the code.

    About the php, do you really need it?
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  9. #29
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    for now the bgw isnot important to me it is the pics im worried about.

    for the php i do need it cause he will upload his one pics in the admin panel.i don't want to edit his pages every time he gets a new pic.

  10. #30
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    If the number of images is constant, you could just name them 1.jpg, 2.jpg, 3.jpg, etc. So when you want to change them you just upload the new ones and rewrite the old ones. But if you really need php, you could just rewrite your code so it would output what I wrote in the html code.
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

Tags for this Thread

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
  •