Forum Sementara Putera.com

Would you like to react to this message? Create an account in a few clicks or log in to continue.
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


2 posters

    display dB report dlm bentuk form

    anysha
    anysha
    Ahli Baharu
    Ahli Baharu


    Number of posts : 19
    Registration date : 08/06/2009

    display dB report dlm bentuk form Empty display dB report dlm bentuk form

    Post by anysha Fri Jun 26, 2009 11:21 am

    guys, nk mtk tlg, bos saya nk "search" repot database di display dlm bentuk form..slalu yg sy buat dlm bentuk table jer..
    ade byk data bg satu2 id tuh means ade looping..sy bole byg skit2 jer tapi xtaw cane..hehe...
    cthnye cmni la..
    cikgu kelas tuh nk tgk details sume student dlm klas 3a , so cikgu akan search 3a dan details akn keluar lbh krg cmni la:

    bil:1
    nama murid: __________
    umur: ______________
    ic: _________________
    alamat:______________
    nama penjaga:_____________

    bil:2
    nama murid: __________
    umur: ______________
    ic: _________________
    alamat:______________
    nama penjaga:_____________

    bil:3
    nama murid: __________
    umur: ______________
    ic: _________________
    alamat:______________
    nama penjaga:_____________


    lebih krg cmtula resultnye..

    p/s:ade yg x fhm x soklan sy ney?? cyclops
    Hansz
    Hansz
    Ahli Baharu
    Ahli Baharu


    Gender : Male Number of posts : 184
    Age : 37
    Location : Kuala Kangsar, Perak
    Job/hobbies : PHP, Design, Developing, Composing, Computer
    Registration date : 01/06/2009

    display dB report dlm bentuk form Empty Re: display dB report dlm bentuk form

    Post by Hansz Fri Jun 26, 2009 11:41 am

    Cuba ni... Sorry, banyak kerja, tak sempat nak test Sad
    Code:
    <table border="1" width="100%" cellpadding="2" bordercolor="#000000" cellspacing="0">
    <tr><td width="5%" align="center" bgcolor="#D7D7D7"><b>Bil.</b></td>
    <td width="30%" align="center" bgcolor="#D7D7D7"><b>Nama Murid</b></td>
    <td width="10%" align="center" bgcolor="#D7D7D7"><b>Umur</b></td>
    <td width="15%" align="center" bgcolor="#D7D7D7"><b>No. K/P</b></td>
    <td width="20%" align="center" bgcolor="#D7D7D7"><b>Alamat</b></td>
    <td width="20%" align="center" bgcolor="#D7D7D7"><b>Penjaga</b></td></tr>
    <?php // Paparkan keseluruhan data kelas
    $student_list = mysql_query("SELECT * FROM student WHERE class='".$_GET['class']."' ORDER BY fullname ASC");
    $count_student = mysql_num_rows($student_list);
    if ($student_list) { while ($sL = mysql_fetch_array($student_list)) { ?>
    <tr><td width="5%" align="center"><b><?php $bil = $bil+1; echo "$bil"; ?></b></td>
          <td width="30%"><b><?php echo $sL['fullname']; ?></b></td>
          <td width="10%"><b><?php echo $sL['age']; ?></b></td>
          <td width="15%"><b><?php echo $sL['ic_no']; ?></b></td>
          <td width="20%"><b><?php echo $sL['address']; ?></b></td>
          <td width="20%"><b><?php echo $sL['parent']; ?></b></td></tr>
    <?php } } mysql_free_result($student_list);
    if ($count_student==0) { ?>
    <tr><td width="100%" colspan="6" align="center"><font color="#FF0000">Tiada Murid Di Kelas Ini</font></td></tr>
    <?php } ?>
    </table>
    anysha
    anysha
    Ahli Baharu
    Ahli Baharu


    Number of posts : 19
    Registration date : 08/06/2009

    display dB report dlm bentuk form Empty Re: display dB report dlm bentuk form

    Post by anysha Fri Jun 26, 2009 12:29 pm

    inchi hanz..thnks for the code..
    tapi udah dibilang sih repot tuh bos x maw dlm bentuk table..nak sejibik mcm output cth kt ats nuh.kalo table ya saya udah siap awl2 lagih..
    huhu.. tongue

    p/s:maaf ya mengkonpiuskan soklannyee..
    Hansz
    Hansz
    Ahli Baharu
    Ahli Baharu


    Gender : Male Number of posts : 184
    Age : 37
    Location : Kuala Kangsar, Perak
    Job/hobbies : PHP, Design, Developing, Composing, Computer
    Registration date : 01/06/2009

    display dB report dlm bentuk form Empty Re: display dB report dlm bentuk form

    Post by Hansz Fri Jun 26, 2009 5:47 pm

    anysha wrote:inchi hanz..thnks for the code..
    tapi udah dibilang sih repot tuh bos x maw dlm bentuk table..nak sejibik mcm output cth kt ats nuh.kalo table ya saya udah siap awl2 lagih..
    huhu.. tongue

    p/s:maaf ya mengkonpiuskan soklannyee..

    Ubah jer lah tablenya Razz Amik coding jer Razz

    Sponsored content


    display dB report dlm bentuk form Empty Re: display dB report dlm bentuk form

    Post by Sponsored content


      Current date/time is Sun May 12, 2024 5:49 pm