Help with this register form..

Started on the old forum in October 2009 · view the original in the archive · old links redirect here

7 replies · 454 views · started 17 years ago · 1 min read

5 participants
ewanz Developer · 187 posts #1

My friend had used the templates for his website.. when he wants to make the register form.. the item in the form cannot insert into the database.. please check this 🙁 register form

<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Pendaftaran ahli kelab komputer KptmKb</title> <meta name="Keywords" content="" /> <meta name="Description" content="" /> <link href="default.css" rel="stylesheet" type="text/css" /> </head> <body>

External image (may be gone)

<h2>Menu</h2>
<ul>
    <li class="selected">[Home](#)</li>
        <li >[Register](#)</li>
        <li>[About](#)</li>
         <li><a href="">Contact</a></li>
</ul>



    <h3>Pautan</h3>
    <ul class="list">
        <li class="first">[Laman web Kptm kota bharu](http://kbharu.kptm.edu.my/)</li>
        <li>[laman web kptm](http://www.kptm.edu.my/)</li>
        <li>[Utusan Malaysia](http://www.utusan.com.my)</li>
        <li>[Harian Metro](http://www.hmetro.com.my)</li>
    
    </ul>
    <h3>Jam</h3>
   <ul class="list">
        <li><embed src="http://www.clocklink.com/clocks/5029-white.swf?TimeZone=GMT0800&"  width="150" height="150" wmode="transparent" type="application/x-shockwave-flash"></li>
        
    </ul>

 

    <h3>Produk terbaru dari Acer</h3>
<img src="" alt="" width="179" height="59" />
  <h2>Pendaftaran Ahli</h2>
  <FORM method= post action="masuk_data.php">

NAMAPENUH: <INPUT TYPE="text" size="50" name=nama>

NAMAPENGGUNA: <INPUT TYPE="namee" TYPE="text" size="30" name=namee>

  KATALALUAN:&nbsp           
   <input type="password" name ="psswd" size="30" maxlength="90" />

SAHKAN KATALALUAN: <input type="password" name ="psswd2" size=30 maxlength=90>*

pastikan anda mengingati katalaluan anda

NO.IC: <INPUT TYPE="text" name="noic" SIZE="14">*

TARIKH LAHIR : <INPUT TYPE="text" name="tlahir" SIZE="2" maxlength="2"> /

<INPUT TYPE="NUMBERIC" SIZE="2" maxlength="2"> / <INPUT TYPE="NUMBERIC" SIZE="4" maxlength="4">

UMUR: <INPUT type="umur" SIZE="3">

JANTINA:

<INPUT TYPE="RADIO" NAME="jantina" VALUE="Y" CHECKED>LELAKI

<INPUT TYPE="RADIO" name="jantina" VALUE="N">PEREMPUAN

KURSUS: <SELECT name="kursus">

<OPTION> <OPTION>DIPLOMA TEKNOLOGI MAKLUMAT <OPTION>DIPLOMA PENGURUSAN PERNIAGAAN <OPTION>DIPLOMA SAINS <OPTION>PRA DIPLOMA SAINS </SELECT>

NO.MATRIKS:<INPUT type="text" size="13" name="nomatrik">

SEMESTER: <SELECT name="SEM">

<OPTION>1 <OPTION>2 <OPTION>3 <OPTION>4 <OPTION>5 <OPTION>6 <OPTION>7 <OPTION>8 </SELECT>

TAJAAN: <SELECT name="loan">

<OPTION>MARA <OPTION>PTPTN <OPTION>LAIN-LAIN </select>

EMAIL : <INPUT TYPE="text" size="50" name="emel">

ALAMAT:

<TEXTAREA name="alamat" ROWS=6 COLS=60></TEXTAREA> <TEXTAREA NAME="COMMENTS" ROWS=6 COLS=60 readonly="true">Setelah mengisi borang pendaftaran sebagai ahli perpustakaan ini, secara rasminya anda merupakan salah seorang ahli KELAB KOMPUTER KPTM KotaBharu. Anda perlu mengingati nama pengguna dan katalaluan setiap kali anda ingin akses masuk ke web rasmi KELAB KOMPUTER KPTM KotaBharu untuk menikmati segala kemudahan yang telah disediakan oleh pihak pengurusan KELAB KOMPUTER KPTM KotaBharu. Anda juga terikat dengan syarat-syarat dan peraturan yang telah di tetapkan oleh pihak KELAB KOMPUTER KPTM KotaBharu. Dengan ini anda juga telah bersetuju untuk mengikuti segala peraturan yang telah di tetapkan. Jika anda didapati melanggar syarat-syarat dan peraturan yang telah ditetapkan, anda juga telah bersedia untuk dikenakan sebarang tindakan oleh pihak pengurusan KELAB KOMPUTER KPTM KotaBharu. </TEXTAREA> <INPUT TYPE="CHECKBOX" NAME="syarat" VALUE="setuju"> Saya setuju untuk menjadi ahli KELAB KOMPUTER KPTM KotaBharu setelah menbaca segala syarat diatas. <hr>

<input type="submit" VALUE="hantar" color="orange"> <input type="reset" VALUE="PADAM">

</td></table> </form>

Copyright (c) 2009.All rights reserved. Design by xmrwnx</a>.

KELAB KOMPUTER KPTM KB</a>

</body> </html>

our lfe is simple words.... 😌 http://mygenkz.net ewanz06@yahoo.com

$output="i am NOoob....";
$newfile="ewanz.txt";
$file = fopen ($newfile, "w");
fwrite($file, $output);
fclose ($file); 
ewanz Developer · 187 posts #2

masuk_data.php file

<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Pendaftaran ahli kelab komputer KptmKb</title> <meta name="Keywords" content="" /> <meta name="Description" content="" /> <link href="default.css" rel="stylesheet" type="text/css" /> </head> <body>

External image (may be gone)

<h2>Menu</h2>
<ul>
    <li class="selected">[Home](#)</li>
        <li >[Register](#)</li>
        <li>[About](#)</li>
         <li><a href="">Contact</a></li>
</ul>



    <h3>Pautan</h3>
    <ul class="list">
        <li class="first">[Laman web Kptm kota bharu](http://kbharu.kptm.edu.my/)</li>
        <li>[laman web kptm](http://www.kptm.edu.my/)</li>
        <li>[Utusan Malaysia](http://www.utusan.com.my)</li>
        <li>[Harian Metro](http://www.hmetro.com.my)</li>
    
    </ul>
    <h3>Jam</h3>
   <ul class="list">
        <li><embed src="http://www.clocklink.com/clocks/5029-white.swf?TimeZone=GMT0800&"  width="150" height="150" wmode="transparent" type="application/x-shockwave-flash"></li>
        
    </ul>

 

    <h3>Produk terbaru dari Acer</h3>
<img src="" alt="" width="179" height="59" />
  <h2>Pendaftaran Ahli</h2>
  <FORM method= post action="masuk_data.php">

NAMAPENUH: <INPUT TYPE="text" size="50" name=nama>

NAMAPENGGUNA: <INPUT TYPE="namee" TYPE="text" size="30" name=namee>

  KATALALUAN:&nbsp           
   <input type="password" name ="psswd" size="30" maxlength="90" />

SAHKAN KATALALUAN: <input type="password" name ="psswd2" size=30 maxlength=90>*

pastikan anda mengingati katalaluan anda

NO.IC: <INPUT TYPE="text" name="noic" SIZE="14">*

TARIKH LAHIR : <INPUT TYPE="text" name="tlahir" SIZE="2" maxlength="2"> /

<INPUT TYPE="NUMBERIC" SIZE="2" maxlength="2"> / <INPUT TYPE="NUMBERIC" SIZE="4" maxlength="4">

UMUR: <INPUT type="umur" SIZE="3">

JANTINA:

<INPUT TYPE="RADIO" NAME="jantina" VALUE="Y" CHECKED>LELAKI

<INPUT TYPE="RADIO" name="jantina" VALUE="N">PEREMPUAN

KURSUS: <SELECT name="kursus">

<OPTION> <OPTION>DIPLOMA TEKNOLOGI MAKLUMAT <OPTION>DIPLOMA PENGURUSAN PERNIAGAAN <OPTION>DIPLOMA SAINS <OPTION>PRA DIPLOMA SAINS </SELECT>

NO.MATRIKS:<INPUT type="text" size="13" name="nomatrik">

SEMESTER: <SELECT name="SEM">

<OPTION>1 <OPTION>2 <OPTION>3 <OPTION>4 <OPTION>5 <OPTION>6 <OPTION>7 <OPTION>8 </SELECT>

TAJAAN: <SELECT name="loan">

<OPTION>MARA <OPTION>PTPTN <OPTION>LAIN-LAIN </select>

EMAIL : <INPUT TYPE="text" size="50" name="emel">

ALAMAT:

<TEXTAREA name="alamat" ROWS=6 COLS=60></TEXTAREA> <TEXTAREA NAME="COMMENTS" ROWS=6 COLS=60 readonly="true">Setelah mengisi borang pendaftaran sebagai ahli perpustakaan ini, secara rasminya anda merupakan salah seorang ahli KELAB KOMPUTER KPTM KotaBharu. Anda perlu mengingati nama pengguna dan katalaluan setiap kali anda ingin akses masuk ke web rasmi KELAB KOMPUTER KPTM KotaBharu untuk menikmati segala kemudahan yang telah disediakan oleh pihak pengurusan KELAB KOMPUTER KPTM KotaBharu. Anda juga terikat dengan syarat-syarat dan peraturan yang telah di tetapkan oleh pihak KELAB KOMPUTER KPTM KotaBharu. Dengan ini anda juga telah bersetuju untuk mengikuti segala peraturan yang telah di tetapkan. Jika anda didapati melanggar syarat-syarat dan peraturan yang telah ditetapkan, anda juga telah bersedia untuk dikenakan sebarang tindakan oleh pihak pengurusan KELAB KOMPUTER KPTM KotaBharu. </TEXTAREA> <INPUT TYPE="CHECKBOX" NAME="syarat" VALUE="setuju"> Saya setuju untuk menjadi ahli KELAB KOMPUTER KPTM KotaBharu setelah menbaca segala syarat diatas. <hr>

<input type="submit" VALUE="hantar" color="orange"> <input type="reset" VALUE="PADAM">

</td></table> </form>

Copyright (c) 2009.All rights reserved. Design by xmrwnx</a>.

KELAB KOMPUTER KPTM KB</a>

</body> </html>

our lfe is simple words.... 😌 http://mygenkz.net ewanz06@yahoo.com

$output="i am NOoob....";
$newfile="ewanz.txt";
$file = fopen ($newfile, "w");
fwrite($file, $output);
fclose ($file); 
ewanz Developer · 187 posts #3

the sql

CREATE TABLE dbmaklumat ( id int(100) NOT NULL auto_increment, nama varchar(40) NOT NULL, namee varchar(10) NOT NULL, Psswd varchar(10) NOT NULL, Psswd2 int(11) NOT NULL, noic varchar(11) NOT NULL, tlahir varchar(11) NOT NULL, umur varchar(1) NOT NULL, jantina varchar(20) NOT NULL, kursus varchar(100) NOT NULL, nomatrik int(11) NOT NULL, SEM varchar(40) NOT NULL, loan varchar(40) NOT NULL, emel varchar(40) NOT NULL, alamat varchar(100) NOT NULL, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

our lfe is simple words.... 😌 http://mygenkz.net ewanz06@yahoo.com

$output="i am NOoob....";
$newfile="ewanz.txt";
$file = fopen ($newfile, "w");
fwrite($file, $output);
fclose ($file); 
sector Newbie · 4 posts #4

I dont see any problem wit these codes

ewanz Developer · 187 posts #5

the item in reg not input into database...

our lfe is simple words.... 😌 http://mygenkz.net ewanz06@yahoo.com

$output="i am NOoob....";
$newfile="ewanz.txt";
$file = fopen ($newfile, "w");
fwrite($file, $output);
fclose ($file); 
i0nutzxp Developer · 150 posts #6

i dont see any INSERT INTO dbmaklumat SET nama='".$nama."' .... etc 😛

<?php unlink('World/Europe/Romania.country'); ?>
djdevil89 Senior · 287 posts #7

also i dont see anywhere an code for mysql connection or an include statement

foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}
Mysterio Lead · 630 posts #8

Ewanz, three last guys are right. First, you should connect to database. Second, you should use a POST or GET method because values will be lost while executing a different php file. Third, make a valid code the values into the desired table. And fourth, your language very hard for me 🙂

mysterio.al - programming is a functional art

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close