Forum Sementara Putera.com

Bersama kita perkemaskan forum ini sementara forum asal dalam pemulihan.

Forum putera dah kembali. Masalah sudah berjaya diselesaikan. Sila lawati http://forum.putera.com/tanya


    cmne nk display image kt php

    Share

    syira86
    Ahli Baharu
    Ahli Baharu

    Gender : Female Number of posts : 108
    Age : 30
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    cmne nk display image kt php

    Post by syira86 on Fri Oct 16, 2009 1:08 am

    salam...sy nk mntk tlg kak2 n abg2 cmne nk display image kt php...sy dah wat coding display tp imge 2 xkuar...cmne erk???

    Code:

    <?php
    $db = mysql_connect("localhost","root","");
    if (!mysql_select_db('uji'))
    die('Error selecting Database!');
    $result = mysql_query("SELECT * FROM food");
    echo
          
             "<table class=mediumtxt width=590 border=1 align=center >";
    echo "<tr><td><b>image</b></td><td><b>title</b></td>
    <td><b> Description</td></tr>";
    while ($myrow = mysql_fetch_array($result)) {

    echo "<tr><td>";
    echo "<img src='".$myrow["image"]." />";
    echo "</td><td>";
    echo $myrow["title"];
    echo "</td><td>";

    echo $myrow["description"];

    echo "</td><td>";
    }
    echo "</table></div>
          </div>
          </div>
          </div>
          </div>
          </div>
          </div>
          </div>
          ";
    ?><b></body>





    die kuar mcm nie

    [img][img=http://img202.imageshack.us/img202/6442/pic3s.th.jpg][/img]

    dans kam
    Ahli Baharu
    Ahli Baharu

    Gender : Male Number of posts : 172
    Age : 35
    Location : Wangsa Maju
    Job/hobbies : PHP
    Registration date : 19/02/2009

    Re: cmne nk display image kt php

    Post by dans kam on Fri Oct 16, 2009 6:40 pm

    tertinggal satu mende.. penutup src tu xde..

    echo "<img src='".$myrow["image"]."' />";

    syira86
    Ahli Baharu
    Ahli Baharu

    Gender : Female Number of posts : 108
    Age : 30
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    Re: cmne nk display image kt php

    Post by syira86 on Fri Oct 16, 2009 7:52 pm

    tima ksh ye awk dans kam..dah dpt wat...tq Very Happy

    syira86
    Ahli Baharu
    Ahli Baharu

    Gender : Female Number of posts : 108
    Age : 30
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    Re: cmne nk display image kt php

    Post by syira86 on Fri Oct 16, 2009 8:09 pm

    1 lg...cmne nk wat table 2 nmp cntik ckit...
    sy wat nie cm pelik la....
    [img][/img]

    dans kam
    Ahli Baharu
    Ahli Baharu

    Gender : Male Number of posts : 172
    Age : 35
    Location : Wangsa Maju
    Job/hobbies : PHP
    Registration date : 19/02/2009

    Re: cmne nk display image kt php

    Post by dans kam on Tue Oct 20, 2009 3:08 pm

    Nak lawa guna CSS..
    Kalo guna table, tgk pada susunan jugak la.
    nape x buat mcm ni,


    <table width="960" border="1" cellspacing="0" cellpadding="3">
    <tr align="left">
    <th scope="col" colspan="2" >Title: Nyonya Food</th>
    </tr>
    <tr>
    <td width="102"><p>Gambar 1</p>
    </td>
    <td width="840">Description 1.....</td>
    </tr>
    <tr>
    <td width="102"><p>Gambar 2</p>
    </td>
    <td width="840">Description 2.....</td>
    </tr>
    </table>

    SmileSmile


    syira86
    Ahli Baharu
    Ahli Baharu

    Gender : Female Number of posts : 108
    Age : 30
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    Re: cmne nk display image kt php

    Post by syira86 on Tue Oct 20, 2009 10:25 pm

    tima kasih ye dans kam....tp mslh sy skrg cmne nk dispaly nyonya food nie mgikut jns2 resepi...conth cm nasi ulam ...cendol...onde2..n sbgainye...

    syira86
    Ahli Baharu
    Ahli Baharu

    Gender : Female Number of posts : 108
    Age : 30
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    Re: cmne nk display image kt php

    Post by syira86 on Wed Oct 21, 2009 12:53 am

    satu lagi cmne nm resize pic2 nie ikut saiz yg sma utk sume pic....harap abg2 n kak2 blh tlg sy

    Sponsored content

    Re: cmne nk display image kt php

    Post by Sponsored content Today at 2:04 pm


      Current date/time is Sun Dec 11, 2016 2:04 pm