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


    Pertolongan Ikhlas Ajar Bina Laman Web

    Share

    syira86
    Ahli Baharu
    Ahli Baharu

    Gender : Female Number of posts : 108
    Age : 30
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    Re: Pertolongan Ikhlas Ajar Bina Laman Web

    Post by syira86 on Mon Jan 04, 2010 8:29 am

    awk,xenomorf.... sy dah buat mcm awk buat itu..dah xkeluar error tp data xnk insert dlm dtabase....sy pn tak tau ape mslahnye

    Code:


    <?php
    include ("config.php"); // include() config.php


          //add process
          if(isset($_POST["submit"])){
             mysql_query("INSERT INTO staff
             (id_staff,username,password,name,age,gender,birth,position,dept,add,tel_of,tel_hp,email,fax_num,pic)
             
             VALUES (
                   '".$_POST["id_staff"]."',
                   '".$_POST["username"]."',
                   '".$_POST["password"]."',
                   '".$_POST["name"]."',
                   '".$_POST["password"]."',
                   '".$_POST["age"]."',
                   '".$_POST["gender"]."',
                   '".$_POST["birth"]."',
                   '".$_POST["position"]."',
                   '".$_POST["dept"]."',
                   '".$_POST["add"]."',
                   '".$_POST["tel_of"]."',
                   '".$_POST["tel_hp"]."',
                   '".$_POST["email"]."',
                   '".$_POST["fax_num"]."',
                   '".$_POST["pic"]."'
                   
                   )");
             
             //redirect page to cat list
             print "<meta http-equiv='refresh' content='1;URL=?page=home'>";

             print "<tr>
                 <td align='center' bgcolor='#99CC33'><strong><h1>Add Data Successfull</h1></strong></td>
               </tr><br />";
          }
       
       ?>



    <form name='borang' method='post' action=''>

    <table width="100%" border="0" cellpadding="0" cellspacing="2">
      <tr><tr bgcolor="#FFCCCC">
             <td colspan="2" align="center"><strong>Staff Information</strong></td>
            </tr>
      <tr>
        <td width="123">Staff Id:</td>
        <td width="357"><input type="text" name="id_staff" id="id_staff"></td>
      </tr>
      <tr>
        <td>Username:</td>
        <td>
          <input name="username" type="text" id="username" size="40">
        </td>
      </tr>
      <tr>
        <td>Password:</td>
        <td>
          <input type="password" name="password" id="password">
        </td>
      </tr>
      <tr>
        <td>Name:</td>
        <td>
          <input name="name" type="text" id="name" size="40">
        </td>
      </tr>
      <tr>
        <td>Age:</td>
        <td>
          <input name="age" type="text" id="age" size="8">
        </td>
      </tr>
      <tr>
        <td>Gender:</td>
        <td>
          <input type="radio" name="gender" id="gender" value="radio">
        Male
        <input type="radio" name="gender" id="gender" value="radio2">
        Female</td>
      </tr>
      <tr>
        <td>Birth of Date:</td>
        <td>
          <input type="text" name="birth" id="birth">
        (dd/mm/yyyy)</td>
      </tr>
      <tr>
        <td>Position:</td>
        <td>
          <input name="position" type="text" id="position" size="40">
        </td>
      </tr>
      <tr>
        <td>Department:</td>
        <td>
          <input name="dept" type="text" id="dept" size="40">
        </td>
      </tr>
      <tr>
        <td>Year of services:</td>
        <td>
          <input type="text" name="services" id="services" />
        </td>
      </tr>
      <tr>
        <td height="69">Address</td>
        <td>
          <textarea name="add" id="add" cols="45" rows="5"></textarea>
        </td>
      </tr>
      <tr>
        <td>Tel Office:</td>
        <td>
          <input type="text" name="tel_of" id="tel_of">
        </td>
      </tr>
      <tr>
        <td>Tel Hp:</td>
        <td>
          <input type="text" name="tel_hp" id="tel_hp">
        </td>
      </tr>
      <tr>
        <td>Email:</td>
        <td>
          <input name="email" type="text" id="email" size="40">
        </td>
      </tr>
      <tr>
        <td>Fax_num:</td>
        <td>
          <input type="text" name="fax_num" id="fax_num">
        </td>
      </tr>
      <tr>
        <td>Pic:</td>
        <td>
          <input type="file" name="pic" id="pic">
        </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>
          <input type="reset" name="Reset" id="button" value="Reset">
          <input type="submit" name="submit" id="submit" value="Register">
        </td>
      </tr>
    </table>
    </form>

     </tr>
    </table></td>
          </tr>
        </table></td>
      </tr>
      <tr valign="middle">
        <td>&nbsp;</td>
      </tr>
    </table>

    syira86
    Ahli Baharu
    Ahli Baharu

    Gender : Female Number of posts : 108
    Age : 30
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    Re: Pertolongan Ikhlas Ajar Bina Laman Web

    Post by syira86 on Mon Jan 04, 2010 8:32 am

    awk,xenomorf.... sy dah buat mcm awk buat itu..dah xkeluar error tp data xnk insert dlm dtabase....sy pn tak tau ape mslahnye

    Code:



    <?php
    include ("config.php"); // include() config.php


          //add process
          if(isset($_POST["submit"])){
             mysql_query("INSERT INTO staff
             (id_staff,username,password,name,age,gender,birth,position,dept,add,tel_of,tel_hp,email,fax_num,pic)
             
             VALUES (
    <?php
    include ("config.php"); // include() config.php


          //add process
          if(isset($_POST["submit"])){
             mysql_query("INSERT INTO staff
             (id_staff,username,password,name,age,gender,birth,position,dept,add,tel_of,tel_hp,email,fax_num,pic)
             
             VALUES (
                   '".$_POST["id_staff"]."',
                   '".$_POST["username"]."',
                   '".$_POST["password"]."',
                   '".$_POST["name"]."',
                   '".$_POST["password"]."',
                   '".$_POST["age"]."',
                   '".$_POST["gender"]."',
                   '".$_POST["birth"]."',
                   '".$_POST["position"]."',
                   '".$_POST["dept"]."',
                   '".$_POST["add"]."',
                   '".$_POST["tel_of"]."',
                   '".$_POST["tel_hp"]."',
                   '".$_POST["email"]."',
                   '".$_POST["fax_num"]."',
                   '".$_POST["pic"]."'
                   
                   )");
             
             //redirect page to cat list
             print "<meta http-equiv='refresh' content='1;URL=?page=home'>";

             print "<tr>
                 <td align='center' bgcolor='#99CC33'><strong><h1>Add Data Successfull</h1></strong></td>
               </tr><br />";
          }
       
       ?>



    <form name='borang' method='post' action=''>

    <table width="100%" border="0" cellpadding="0" cellspacing="2">
      <tr><tr bgcolor="#FFCCCC">
             <td colspan="2" align="center"><strong>Staff Information</strong></td>
            </tr>
      <tr>
        <td width="123">Staff Id:</td>
        <td width="357"><input type="text" name="id_staff" id="id_staff"></td>
      </tr>
      <tr>
        <td>Username:</td>
        <td>
          <input name="username" type="text" id="username" size="40">
        </td>
      </tr>
      <tr>
        <td>Password:</td>
        <td>
          <input type="password" name="password" id="password">
        </td>
      </tr>
      <tr>
        <td>Name:</td>
        <td>
          <input name="name" type="text" id="name" size="40">
        </td>
      </tr>
      <tr>
        <td>Age:</td>
        <td>
          <input name="age" type="text" id="age" size="8">
        </td>
      </tr>
      <tr>
        <td>Gender:</td>
        <td>
          <input type="radio" name="gender" id="gender" value="radio">
        Male
        <input type="radio" name="gender" id="gender" value="radio2">
        Female</td>
      </tr>
      <tr>
        <td>Birth of Date:</td>
        <td>
          <input type="text" name="birth" id="birth">
        (dd/mm/yyyy)</td>
      </tr>
      <tr>
        <td>Position:</td>
        <td>
          <input name="position" type="text" id="position" size="40">
        </td>
      </tr>
      <tr>
        <td>Department:</td>
        <td>
          <input name="dept" type="text" id="dept" size="40">
        </td>
      </tr>
      <tr>
        <td>Year of services:</td>
        <td>
          <input type="text" name="services" id="services" />
        </td>
      </tr>
      <tr>
        <td height="69">Address</td>
        <td>
          <textarea name="add" id="add" cols="45" rows="5"></textarea>
        </td>
      </tr>
      <tr>
        <td>Tel Office:</td>
        <td>
          <input type="text" name="tel_of" id="tel_of">
        </td>
      </tr>
      <tr>
        <td>Tel Hp:</td>
        <td>
          <input type="text" name="tel_hp" id="tel_hp">
        </td>
      </tr>
      <tr>
        <td>Email:</td>
        <td>
          <input name="email" type="text" id="email" size="40">
        </td>
      </tr>
      <tr>
        <td>Fax_num:</td>
        <td>
          <input type="text" name="fax_num" id="fax_num">
        </td>
      </tr>
      <tr>
        <td>Pic:</td>
        <td>
          <input type="file" name="pic" id="pic">
        </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>
          <input type="reset" name="Reset" id="button" value="Reset">
          <input type="submit" name="submit" id="submit" value="Register">
        </td>
      </tr>
    </table>
    </form>

     </tr>
    </table></td>
          </tr>
        </table></td>
      </tr>
      <tr valign="middle">
        <td>&nbsp;</td>
      </tr>
    </table>
                   '".$_POST["id_staff"]."',
                   '".$_POST["username"]."',
                   '".$_POST["password"]."',
                   '".$_POST["name"]."',
                   '".$_POST["password"]."',
                   '".$_POST["age"]."',
                   '".$_POST["gender"]."',
                   '".$_POST["birth"]."',
                   '".$_POST["position"]."',
                   '".$_POST["dept"]."',
                   '".$_POST["add"]."',
                   '".$_POST["tel_of"]."',
                   '".$_POST["tel_hp"]."',
                   '".$_POST["email"]."',
                   '".$_POST["fax_num"]."',
                   '".$_POST["pic"]."'
                   
                   )");
             
             //redirect page to cat list
             print "<meta http-equiv='refresh' content='1;URL=?page=home'>";

             print "<tr>
                 <td align='center' bgcolor='#99CC33'><strong><h1>Add Data Successfull</h1></strong></td>
               </tr><br />";
          }
       
       ?>



    <form name='borang' method='post' action=''>

    <table width="100%" border="0" cellpadding="0" cellspacing="2">
      <tr><tr bgcolor="#FFCCCC">
             <td colspan="2" align="center"><strong>Staff Information</strong></td>
            </tr>
      <tr>
        <td width="123">Staff Id:</td>
        <td width="357"><input type="text" name="id_staff" id="id_staff"></td>
      </tr>
      <tr>
        <td>Username:</td>
        <td>
          <input name="username" type="text" id="username" size="40">
        </td>
      </tr>
      <tr>
        <td>Password:</td>
        <td>
          <input type="password" name="password" id="password">
        </td>
      </tr>
      <tr>
        <td>Name:</td>
        <td>
          <input name="name" type="text" id="name" size="40">
        </td>
      </tr>
      <tr>
        <td>Age:</td>
        <td>
          <input name="age" type="text" id="age" size="8">
        </td>
      </tr>
      <tr>
        <td>Gender:</td>
        <td>
          <input type="radio" name="gender" id="gender" value="radio">
        Male
        <input type="radio" name="gender" id="gender" value="radio2">
        Female</td>
      </tr>
      <tr>
        <td>Birth of Date:</td>
        <td>
          <input type="text" name="birth" id="birth">
        (dd/mm/yyyy)</td>
      </tr>
      <tr>
        <td>Position:</td>
        <td>
          <input name="position" type="text" id="position" size="40">
        </td>
      </tr>
      <tr>
        <td>Department:</td>
        <td>
          <input name="dept" type="text" id="dept" size="40">
        </td>
      </tr>
      <tr>
        <td>Year of services:</td>
        <td>
          <input type="text" name="services" id="services" />
        </td>
      </tr>
      <tr>
        <td height="69">Address</td>
        <td>
          <textarea name="add" id="add" cols="45" rows="5"></textarea>
        </td>
      </tr>
      <tr>
        <td>Tel Office:</td>
        <td>
          <input type="text" name="tel_of" id="tel_of">
        </td>
      </tr>
      <tr>
        <td>Tel Hp:</td>
        <td>
          <input type="text" name="tel_hp" id="tel_hp">
        </td>
      </tr>
      <tr>
        <td>Email:</td>
        <td>
          <input name="email" type="text" id="email" size="40">
        </td>
      </tr>
      <tr>
        <td>Fax_num:</td>
        <td>
          <input type="text" name="fax_num" id="fax_num">
        </td>
      </tr>
      <tr>
        <td>Pic:</td>
        <td>
          <input type="file" name="pic" id="pic">
        </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>
          <input type="reset" name="Reset" id="button" value="Reset">
          <input type="submit" name="submit" id="submit" value="Register">
        </td>
      </tr>
    </table>
    </form>

     </tr>
    </table></td>
          </tr>
        </table></td>
      </tr>
      <tr valign="middle">
        <td>&nbsp;</td>
      </tr>
    </table>

    johnburn
    Moderators
    Moderators

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

    Re: Pertolongan Ikhlas Ajar Bina Laman Web

    Post by johnburn on Mon Jan 04, 2010 9:14 am

    awk kne buat script untuk upload pic tu, then ambik name pic tu br query ke db. kl yg cam script skang ni mmg xleh. sbb tu xmsuk db.


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

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

    syira86
    Ahli Baharu
    Ahli Baharu

    Gender : Female Number of posts : 108
    Age : 30
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    Re: Pertolongan Ikhlas Ajar Bina Laman Web

    Post by syira86 on Mon Jan 04, 2010 9:53 am

    oo...tapi sy cube buang form upload pic itu tp stil xleh insert pn....sy nk cube insert form yg biase dulu tp xblh pn....pelik je

    OngBok
    Moderators
    Moderators

    Gender : Male Number of posts : 729
    Location : Dungun Terengganu
    Job/hobbies : Pesara JKR
    Registration date : 18/02/2009

    Re: Pertolongan Ikhlas Ajar Bina Laman Web

    Post by OngBok on Mon Jan 04, 2010 10:14 am

    Syira nie macam kelam kabut sikit, dah hilang punca.
    aku follow pun pening. cuba buat dummy dari awal.
    guna dreamweaver kan.


    --------------------------------------------
    =====================================================
    http://www.photoshopessentials.com/
    http://www.megaleech.eu/index.php
    https://connectnow.acrobat.com/oxxxo2009

    syira86
    Ahli Baharu
    Ahli Baharu

    Gender : Female Number of posts : 108
    Age : 30
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    Re: Pertolongan Ikhlas Ajar Bina Laman Web

    Post by syira86 on Mon Jan 04, 2010 10:25 am

    blum kelam kabut lg la.....dah buat dummy pn tapi trus xblh connect la

    OngBok
    Moderators
    Moderators

    Gender : Male Number of posts : 729
    Location : Dungun Terengganu
    Job/hobbies : Pesara JKR
    Registration date : 18/02/2009

    Re: Pertolongan Ikhlas Ajar Bina Laman Web

    Post by OngBok on Mon Jan 04, 2010 10:32 am

    Buat dummy dalam dreamweaver(DW) dan phpmyadmin.

    1. Ceate folder untuk simpan fail (dua folder)
    2. Set/manage Site dalam DW
    3. Create simple DB guna phpmyadmin
    4. Connect DB guna DW.
    5. Create simple form untuk insert data dalam Table/DB
    6. Show data dari DB guna DW
    ok.


    --------------------------------------------
    =====================================================
    http://www.photoshopessentials.com/
    http://www.megaleech.eu/index.php
    https://connectnow.acrobat.com/oxxxo2009

    syira86
    Ahli Baharu
    Ahli Baharu

    Gender : Female Number of posts : 108
    Age : 30
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    Re: Pertolongan Ikhlas Ajar Bina Laman Web

    Post by syira86 on Mon Jan 04, 2010 12:28 pm

    sy dah tgok tutorial dreamweaver yg awk post 2....tp sy guna dreamweaver cs4 la

    OngBok
    Moderators
    Moderators

    Gender : Male Number of posts : 729
    Location : Dungun Terengganu
    Job/hobbies : Pesara JKR
    Registration date : 18/02/2009

    Re: Pertolongan Ikhlas Ajar Bina Laman Web

    Post by OngBok on Mon Jan 04, 2010 1:09 pm

    CS 4 pun lebih kurang sama jugak.


    --------------------------------------------
    =====================================================
    http://www.photoshopessentials.com/
    http://www.megaleech.eu/index.php
    https://connectnow.acrobat.com/oxxxo2009

    xenomorf
    Ahli Baharu
    Ahli Baharu

    Number of posts : 239
    Location : BehinD ThE WaLL
    Registration date : 26/03/2009

    Re: Pertolongan Ikhlas Ajar Bina Laman Web

    Post by xenomorf on Mon Jan 04, 2010 11:18 pm

    masalahnya kat bhgian form tu. bhgian action tu ko kosongkan jd cmni >>
    <form method="POST" action=""/>

    yg betulnya, ko kena letak page yg akan buat action tu nnt. cntoh >>
    <form method="POST" action="reg.php"/>

    atau blh jg gn PHP_SELF cmni>>
    <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>"/>

    tp sy x galakkan coz yg tu senang kena exploit (xss).

    ***btw, x pyh gn dreamweaver pun boleh. gn notepad ja pun bleh bt website. sy rekomenkan notepad++

    Sponsored content

    Re: Pertolongan Ikhlas Ajar Bina Laman Web

    Post by Sponsored content Today at 8:25 am


      Current date/time is Mon Dec 05, 2016 8:25 am