January 14, 201016 yr comment_1013544 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> </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"> <strong> 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> 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> 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> 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> 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> 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 & Memuaskan </strong></font><strong>:</strong></p> <p align="center">________________</p> <p align="center">( )</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> Report
January 14, 201016 yr comment_1013547 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']; ?>"> Report
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.