kalo belajar script pemrograman coba masuk ke milis yg khusus webmaster 
or webdesigner ato forum2 web.

-maaf ga' membantu-

A. Riadi wrote:
> Halo rekan2 mailplus.
>
> Saya baru belajar PHP dan ada kendala, tolong dibantu ya.
>
> Saya punya satu file taruhlah namanya "view.php". Di file ini ada tag 
> yang saya masukkan yaitu :
>
> echo ("<a href=spare_edit.php?sn=$sn>Edit</a>");
>
> $sn sendiri adalah variabel yang merujuk ke salah satu record di SQL 
> pada field "sn" dan rencananya variabel ini akan digunakan sebagai 
> inisialisasi untuk mengubah field yang lain yang satu record dengannya.
>
> File untuk editnya seperti di bawah ini (spare_edit.php). Saya dapat 
> kendala, karena ternyata pada file tersebut $sn tidak terbaca untuk 
> mengambil record pada SQL, tag nya adalah :
>
> "select * from $tablename where sn='$sn'";
>
> Karena variabel $sn tidak bisa dikenali, maka yang tampil 
> pada "spare_edit.php" adalah blank, record yang dimaksud tidak 
> ditampilkan.
>
> Mohon pencerahannya ya. Sebelumnya, saya ucapkan terimakasih banyak.
>
>
>
>
> Script "spare_edit.php" sbb :
>
> <?php
> // ----- ambil isi dari file utama_spare.php
> require("utama_spare.php");
>
> // ----- hubungkan ke database
> $link=open_connection();
>
> // ----- menentukan nama tabel
> $tablename="sparetbl";
>
> // ----- perintah SQL dimasukkan ke dalam variable string
> $sqlstr="select * from $tablename where sn='S21W405496'";
>
> // ------ jalankan perintah SQL
> $result = mysql_query ($sqlstr) or die ("Kesalahan pada perintah SQL!");
>
> // ------ putus hubungan dengan database
> mysql_close($link);
>
> // ------ ambil isi masing-masing record
> while ($row = mysql_fetch_array ($result))
>
> {
>
> // ------ menampilkan di layar browser
> echo "<form method=\"post\" action=\"spare_update.php\">";
> echo "<input type=\"hidden\" name=\"no\" value=\"$row[0]\">";
> echo "<br>";
> echo "Sub System : <input type=\"text\" name=\"subsystem\" value=\"$row
> [1]\">";
> echo "<br>";
> echo "Board Name : <input type=\"text\" name=\"board_name\" value=\"$row
> [2]\">";
> echo "<br>";
> echo "Sec Code : <input type=\"text\" name=\"sec_code\" value=\"$row[3]
> \">";
> echo "<br>";
> echo "Original S/N : <input type=\"text\" name=\"original_sn\" 
> value=\"$row[4]\">";
> echo "<br>";
> echo "S/N : <input type=\"text\" name=\"sn\" value=\"$row[5]\">";
> echo "<br>";
> echo "Qty : <input type=\"text\" name=\"qty\" value=\"$row[6]\">";
> echo "<br>";
> echo "Status : <input type=\"text\" name=\"status\" value=\"$row[7]\">";
> echo "<br>";
> echo "Remark : <input type=\"text\" name=\"remark\" value=\"$row[8]\">";
> echo "<br>";
> echo "<input type=\"submit\" name=\"submit\" value=\"update\">";
> echo "</form>";
> }
> ?>
>
>
>
>
>
>
>
>
>  
> Yahoo! Groups Links
>
>
>
>  
>
>
>
>   



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/mailplus/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Kirim email ke