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


3 posters

    programming

    avatar
    allef
    Ahli Baharu
    Ahli Baharu


    Number of posts : 2
    Registration date : 14/01/2010

    programming Empty programming

    Post by allef Thu Jan 14, 2010 8:20 am

    saya ade masalah berkaitan php.
    saya mahu paparkan data yg telah dihantar dalam browser yg lain.

    tabloe sudah menjadi cuma paparan tidak kelihatan.

    tolong:)

    ini code nya:

    <?
    session_start();
    ?>
    <?

    $txt_tarikh_pinjam = date("Y-m-d");

    $font1 = "<font face=\"trebuchet MS\">";

    date_default_timezone_set('Asia/Singapore');
    ?>


    <?
    if ( isset($_GET['id']) ) { $txt_bil = $_GET['id']; }
    else { $txt_bil = ''; }



    include "connection_1/connection.php";
    $query = "select * from hartamodal where txt_bil = '$txt_bil'";
    $result = mysql_query($query) or die("Couldn't execute query");
    $result = mysql_fetch_assoc($result);


    ?>

    <p></p>
    <html>
    <head>
    <title>Daftar Pergerakan Harta Modal Dan Inventori</title>
    </head>

    <link rel="icon" type="image/vnd.microsoft.icon" href="Banner/LOGO copy.png">


    <body bgcolor="#FFCC99" background="Banner/back.jpg" topmargin="0" belowmargin="0">

    <table align="center" border="3"
    width="620"
    cellpadding="3"
    cellspacing="0"
    bgcolor="">
    <tr>

    <td height="136" colspan="2" align="center" valign="top">

    <font face="Trebuchet MS">
    <form method="post" action="kini.php?id=<?php echo $txt_bil; ?>">
    </font>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <font face="Trebuchet MS">
    <h2>
    </font>
    <p>&nbsp;</p>
    <p><font face="Trebuchet MS"><img src="Banner/bannerutama.jpg" width="648" height="100">

    </font></p>
    <tr bordercolor="" bgcolor="#CCCCCC"></tr><tr bordercolor="#333333" bgcolor="#CCCCCC">
    <td width="131" height="19"><font face="Trebuchet MS">&nbsp;<strong>&nbsp;Bil. </strong></font></td>
    <td width="471"><font face="Trebuchet MS"><strong><? echo $result['txt_bil']; ?></strong></font></td>
    </tr>

    <tr bordercolor="" bgcolor="#CCCCCC">
    <td width="131"><font face="Trebuchet MS"><strong>&nbsp;&nbsp;Nama </strong></font></td>
    <td width="471"><font face="Trebuchet MS"><strong><? echo $result['txt_nama']; ?></strong></font></td>
    </tr>

    <tr bordercolor="" bgcolor="#CCCCCC">
    <td><font face="Trebuchet MS"><strong>&nbsp;&nbsp;Lokasi </strong></font></td>
    <td><font face="Trebuchet MS"><strong><? echo $result['txt_no_ic']; ?></strong></font></td>
    </tr>

    <tr bgcolor="#CCCCCC">
    <td><font face="Trebuchet MS"><strong>&nbsp;&nbsp;Seksyen </strong></font></td>
    <td><font face="Trebuchet MS"><strong><? echo $result['lst_seksyen']; ?></strong></font></td>
    </tr>

    <tr bgcolor="#CCCCCC">
    <td><font face="Trebuchet MS"><strong>&nbsp;&nbsp;No. telefon </strong></font></td>
    <td><font face="Trebuchet MS"><strong><? echo $result['txt_tarikh_pinjam']; ?></strong></font></td>
    </tr>

    <tr bgcolor="#CCCCCC">
    <td><font face="Trebuchet MS"><strong>&nbsp;&nbsp;Keterangan </strong></font></td>
    <td><font face="Trebuchet MS"><strong><? echo $result['lst_jenis_alatan']; ?></strong></font></td>
    </tr>
    </table>

    <br>

    <p align="center">
    <strong><font face="Trebuchet MS">Tarikh Selesai:</font></strong>
    <font face="Trebuchet MS">
    <input type="text" name="txt_tarikh_tindakan" size="15" maxlength="15" value="<? echo $result['txt_tarikh_tindakan']; ?>">
    </font></p>
    <p align="center">
    <font face="Trebuchet MS"><strong>Tindakan Selesai?</strong>
    <input name="chk_selesai" type="checkbox" <? if ($result['chk_selesai'] == 'on'){ echo "CHECKED";}?> >
    </font></p>
    <p align="center"><font face="Trebuchet MS"><strong>Kerja Selesai &amp; Memuaskan </strong></font><strong>:</strong></p>

    <p align="center">________________</p>
    <p align="center">(&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)</p>

    <p align="center">
    <input type="reset" value=" Reset " class="color1">

    <input type="submit" value=" Hantar " class="color1">
    </p>

    <p align="center"><a href="kemaskini/selesai.php"></a></p>

    </table>
    </form>
    </body>
    </html>
    TJ-Ariff
    TJ-Ariff
    Supervisor
    Supervisor


    Gender : Male Number of posts : 473
    Age : 104
    Location : D'Royal City Of Silver
    Job/hobbies : IT / membaca / Santai
    Registration date : 17/02/2009

    programming Empty Re: programming

    Post by TJ-Ariff Thu Jan 14, 2010 2:55 pm

    Salah tempat nie dik oiii...

    --->> Topik dipindahkan..
    avatar
    allef
    Ahli Baharu
    Ahli Baharu


    Number of posts : 2
    Registration date : 14/01/2010

    programming Empty Re: programming

    Post by allef Thu Jan 14, 2010 3:28 pm

    kat mana nak post bnd nie?
    johnburn
    johnburn
    Moderators
    Moderators


    Gender : Male Number of posts : 755
    Location : Terengganu
    Registration date : 07/03/2009

    programming Empty Re: programming

    Post by johnburn Thu Jan 14, 2010 3:45 pm

    allef wrote:saya ade masalah berkaitan php.
    saya mahu paparkan data yg telah dihantar dalam browser yg lain.

    tabloe sudah menjadi cuma paparan tidak kelihatan.

    tolong:)

    xberape pham dgn ayat "paparkan data yg telah dihantar dalam browser yg lain" tu, tp mungkin mksd allef data yg di query tu xkuar kt form (dalam table). Kl tgk kod yg allef bg tu, allef pkai mysql_fetch_assoc(). Funtion ni akan return kan row atau data yg diquery tu dlm bentuk associative array. So kl tgk kod allef ni, row atau data tersebut akan disimpan dalam array $result:
    Code:
    $result = mysql_fetch_assoc($result);

    Jd untuk echo data yg ada dalam array tu, allef perlu memanggilnya dgn menggunakan key. Rjuk contoh ni:
    Code:
    <form method="post" action="kini.php?id=<?php echo $result['txt_bil']; ?>">

    Sponsored content


    programming Empty Re: programming

    Post by Sponsored content


      Current date/time is Mon Nov 18, 2024 4:22 am