PHP Indonesia - Facebook | PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ | |
Guys ... maaf mengganggu , saya mau nayak bagaima... Aug 12th 2013, 03:15, by Ar Land | Guys ... maaf mengganggu , saya mau nayak bagaimana cara membuat tombol hapus ... setiap nomer itu ada tombol hapusnya :D |
| | <script> function proses(){
var teks = "";
j = document.getElementById("jumlah").selectedIndex;
for(i=1;i<=j;i++){
teks = teks + "Option " + i + " <input type=text name=jawaban[] size=50><br>";
}
document.getElementById("opt").innerHTML = teks; } </script>
<html>
<body>
<form method="POST" action="inputpolling.php"> Pertanyaan Polling :<br> <textarea rows="3" name="tanya" cols="36"></textarea><p> <p>Jumlah Jawaban : <select size="1" name="jumlah" id=jumlah onchange=proses()> <option>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> </select></p> <div id=opt></div> <p><input type="submit" value="Submit"></p> <h1>Tabel Pertanyaan : </h1> <table border="1" width="500px"> <th><td>ID_Tanya </a></td><td>Pertanyaan </td><td>Tanggal</td><td>Tombol</td></th>
<!-- example 1 :menampilkan data di tabel--> <?php
include "conn.php";
$query1="select * from polling_pertanyaan ";
$result=mysql_query($query1) or die(mysql_error()); $no=1; //penomoran while($rows=mysql_fetch_object($result)){ ?> <tr> <td><?php echo $no ?></td> <td><?php echo $rows -> idtanya;?> </td> <td><?php echo $rows -> pertanyaan;?> </td> <td> <?php echo $rows -> tanggal;?> </td> </tr> <?php $no++; }?> </table> </form> </table> <!--end of example 2 --> </body> </html> // DI TARUH MANA KODING NYA , MAAF COZ SUDAH BUNTUU HEHEH |
| | taro abis tanggal. contoh : <td> <?php echo $rows -> tanggal;?> </td> <td> -----Taro sini--- </td> </tr> |
| | Super sekali. Saya kasih clue saja. Tombolnya juga kena looping :D | | |
|
Tidak ada komentar:
Posting Komentar