hi guys
Need help adding data to database where the forms are inside a table
i cant seem to make it work
below is the code i made
[code]<?php
include(‘connectdb.php’);
?>
ADD STUDENTS
Personal Information | |
Student Number : | Gender : Male Female |
Password : | Religion : |
Last Name : | Civil Status : Single Married Widowed Divorced |
First Name : | Nationality : |
Middle Name : | Postal Code : |
Birth Date : | Eligible for Next School Year : Yes No |
Birth Place : | Enrollment Status : Enrolled Not_Enrolled |
Address : | |
Parent Guardian Information | |
Father : | Father Contact No : |
Mother : | Mother Contact No : |
Parent Address : | |
Guardian : | Guardian Contact No : |
Guardian Address : | |
$query = "insert into students (stud_no,password,lname,fname,mname,bday,bplace,gender,religion,address,civilstatus,nationality,postalcode,father,fcontact,mother,mcontact,guardian,gcontact,paddress,gaddress,eligible,estatus) values ('$stud_no','$password','$lname','$fname','$mname','$bday','$bplace','$gender','$religion','$address','$civilstatus','$nationality','$postalcode','$father','$fcontact','$mother','$mcontact','$guardian','$gcontact','$paddress','$gaddress','$eligible','$estatus')";
mysql_query($query) or die (mysql_error());
}
?>
[/code]