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


    programming

    Share

    allef
    Ahli Baharu
    Ahli Baharu

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

    programming

    Post by allef on 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>
    avatar
    TJ-Ariff
    Supervisor
    Supervisor

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

    Re: programming

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

    Salah tempat nie dik oiii...

    --->> Topik dipindahkan..


    --------------------------------------------

    I'm A Big Big Man, In A Big Big World, It's Not A Big Big Thing, If You Leave Me.
    When GOD Opened the window of mercy,HE asked me; What is your wish for to day?, I said; Allah, Please take care of that person who is reading this message.

    allef
    Ahli Baharu
    Ahli Baharu

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

    Re: programming

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

    kat mana nak post bnd nie?
    avatar
    johnburn
    Moderators
    Moderators

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

    Re: programming

    Post by johnburn on 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']; ?>">


    --------------------------------------------

    tahukah kamu saat kamu menangis
    adalah air mata ku yang jatuh berlinang
    tahukah kamu saat kamu tersakiti
    adalah aku yang pertama terluka
    Jangan Klik

    Sponsored content

    Re: programming

    Post by Sponsored content


      Current date/time is Wed May 24, 2017 11:47 pm