0
$result = "Insert into insert_data (namapelajar1, namapelajar2, 
            namapelajar3, nopendaftaran1,nopendaftaran2,nopendaftaran3) 
          values                
         ('$namapelajar1','$namapelajar2','$namapelajar3',
          '$nopendaftaran1', '$nopendaftaran2','$nopendaftaran3',
          '$kelas', '$tajukprojek');";

It always prompt

Parse error: Parse error: syntax error, unexpected '$result' (T_VARIABLE) in C:\xampp\htdocs\sistem\insert_data.php on line 20

Any one can keep me some advise?? Many thanks!!

Giorgos Betsos
  • 71,379
  • 9
  • 63
  • 98

1 Answers1

0

There are two extra column inside values only 6 field are specified but you enter 8 values. Try this

$result = " Insert into insert_data(namapelajar1,namapelajar2,namapelajar3,nopendaftaran1,nopendaftaran2,nopendaftaran3) values ('$namapelajar1','$namapelajar2','$namapelajar3','$nopendaftaran1','$nopendaftaran2','$nopendaftaran3')";
Jithin Kuriakose
  • 317
  • 5
  • 22