Results 1 to 2 of 2

Thread: dynamic form ->r0kawa tolonnnnnn...

  1. #1
    Join Date
    Mar 2002
    Location
    -
    Posts
    16
    Rep Power
    0

    Unhappy dynamic form ->r0kawa tolonnnnnn...

    akum, firstly saya nak minta kengkawang xpcially r0kawa tolong nengok & settle kan masalah saya kat bawah nih:

    a'kum wbt,
    sameon, leh tak awak tolong saya bg cth coding utk masukkan input >1 sekaligus dlm 1 masa.So, input nih kener gunakan array.saya bg cth coding form yg saya dah wat.Leh tak awak tolon bg coding camner nak masukkan dlm db nyer.sbb saya dah wat gak utk coding input ke db, tp masalahnye camni, kotak input saya tu ader 10 kotak.Dlm masa yg sama saya ader hantar input hidden utk tiap2 KOD_JENIS skali, so biler saya nak masukkan 3 input jer, dia akan masukkan nilai input hidden tu sampai 10 x.so camner yek.Saya bg kat awak view table , coding tuk form & coding input yg tak jadik tuh.TOLONN....harap dpt bantu...

    ->cth table:PRM_KOD1 field->spt dbwh

    KOD_JENIS KOD1_ KOD KOD1_NAMA
    --- ----- ------------------------------
    KAW 1 IBU PEJABAT
    KAW 2 KUALA TERENGGANU/MARANG
    KAW 3 HULU TERENGGANU
    KAW 4 DUNGUN
    KAW 5 BESUT
    KAW 6 KEMAMAN
    KAW 7 SETIU
    KAW 8 KETENGAH
    JAB 01 SATU HQ
    JAW 01 PENGURUS
    JAW 02 EKSEKUTIF
    KJW 01 EKSEKUTIF
    KJW 02 BUKAN EKSEKUTIF
    BAN 1 MELAYU
    BAN 2 CINA
    BAN 3 INDIA
    AGM 1 ISLAM
    AGM 2 BUDHA
    AGM 3 KRISTIAN
    WAR 1 MALAYSIA
    WAR 2 THAILAND

    dalam table nih, saya kene input bangsa, agama, kaw, jab etc gunakan borang yg berlainan.So dtiap 2 borang tuh s/thing like this lah:

    <html>

    <!--daftar_agama.php-->

    <head>

    <title>Daftar Agama</title>

    </head>

    <body>

    <?php $bil=10;?>

    <form action="insert_cuber.php" method="post">

    <blockquote>

    <div align="center">

    <center>

    <br>

    <br>

    </center>

    </div>

    </blockquote>

    <div align="center">

    <center>

    <table border="0" width="40%" height="250">

    <tr bgcolor="#006699">

    <td width="77%" height="19" colspan="2"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="2">Daftar

    Agama</font></td>

    </tr>

    <tr bgcolor="#BFD9FF">

    <td width="11%" height="19"><font face="Arial, Helvetica, sans-serif" size="2">Kod</font></td>

    <td width="66%" height="19"><font face="Arial, Helvetica, sans-serif" size="2">Keterangan</font></td>

    </tr>

    <?php for($i = 1; $i <= $bil; $i++ ): ?>

    <tr>

    <td width="11%" height="19">

    <input type="text" name="agama_kod[]" size="5" style="text-transform: uppercase>

    </td>

    <td width="66%" height="23">

    <input type="text" name="agama_ktrgn[]" size="35"style="text-transform: uppercase>

    </td>

    </tr>

    <?endfor?>

    <tr>

    <td width="103%" height="19" colspan="2">

    <input type="hidden" value="AGM" name="agama_kodjenis">

    <input type="submit" value="Submit" name="B1">

    <input type="reset" value="Reset" name="B2">

    </td>

    </tr>

    </table>

    </center>

    </div>

    </form>

    </body>

    </html>

    pastu kat bawah ni lak cth coding tuk masukkan dlm db.Tapi gunakan oracle lah.samer jer behavior dia ngan SQl, cume sintak dia jer yg laing.Mu tolon yek.



    <HTML>

    <!--agama_insert_daf.php-->

    <HEAD>

    <TITLE>Insert Portfolio</TITLE>

    </HEAD>

    <BODY BGCOLOR="#FF99CC">

    <CENTER><B>Insert Status</B>

    <BR><BR>

    <?php

    include("common.php");




    $num_rows = count($agama_kod);

    $i=0;

    while( $i=< $num_rows){

    $username="PAYROLL";

    $password="PAYROLL";

    $database="DEMODB";

    $connection = OCIlogon($username, $password, $database);



    $stmt = OCIParse($connection, "INSERT INTO PRM_KOD1 VALUES ('00','" . $agama_jeniskod . "','" . strtoupper($agama_kod[$i]) . "','"

    . strtoupper($agama_ktrg[$i]) . "','')");


    $ret = OCIExecute($stmt);

    if ($ret == "1") {

    echo("Insert was successful.Dah berjaya");

    } else {

    echo("Insert failed. Error code: OCIExecute = " . $ret);

    }


    OCIFreeStatement($stmt);

    OCILogoff($connection);


    ++$i;

    }

    ?>

    </CENTER>

    </BODY>

    </HTML>

    Awak bagi la saya cth coding gunakan sql pung tak per.Nanti insyaAllah saya implement lam oracl.Tapi letak comment banyok sket la.Saya ni baby baru merangkak.Harap dpt bantu..

  2. #2
    Join Date
    Nov 2001
    Location
    MLK
    Posts
    119
    Rep Power
    225
    err.. kena r0kawa jer ke yang jawab? orang lain tak boleh jawab? :P . Ahhh.. kan dah balas kat emel dulu, sian orang lain takboleh jawab soalan ni.. lain kali tanya soalan general jer, jangan letak nama2, tak sesuaiiii... tau

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dynamic suckerfish menu
    By umarzuki in forum Website Design
    Replies: 2
    Last Post: 31-12-2008, 08:07 PM
  2. chart with dynamic data
    By myjali in forum Website Programming
    Replies: 0
    Last Post: 23-12-2008, 12:08 PM
  3. Static or Dynamic?
    By azren in forum Website Design
    Replies: 10
    Last Post: 03-12-2004, 10:36 PM
  4. Apa tu Dynamic Domain Name System ????
    By Tekno-daei in forum Domain Names
    Replies: 2
    Last Post: 25-03-2004, 04:17 PM
  5. r0kawa->php
    By nuha in forum Website Programming
    Replies: 1
    Last Post: 03-04-2002, 12:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113