Crystal eye
New Member
how can I maximize the use of add code in my php, here is my code: create.php \[code\] mysql_select_db("koro", $con); $sql="INSERT INTO students (IDNUMBER, LNAME, FNAME, MNAME, GRADEYR, ADDRESS) VALUES ('$_POST[INAME]', '$_POST[LName]', '$_POST[FName]', '$_POST[MName]', '$_POST[GradeOrYear]', '$_POST[Address]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "<script>alert('Student Added!')</script>" ?>\[/code\]createstudentform.html \[code\] <form action="create.php" method="post"> <td>ID:<input type="text" name="INAME" value="" /><br/> LastName:<input type="text" name="LName" value="" /><br/> Firstname:<input type="text" name="FName" value="" /><br/> Middlename:<input type="text" name="MName" value="" /><br/> GradeOrYear:<input type="text" name="GradeOrYear" value="" /><br/> Address:<input type="text" name="Address" value="" /> <br/> </td> <td>ID:<input type="text" name="INAME" value="" /><br/> LastName:<input type="text" name="LName" value="" /><br/> Firstname:<input type="text" name="FName" value="" /><br/> Middlename:<input type="text" name="MName" value="" /><br/> GradeOrYear:<input type="text" name="GradeOrYear" value="" /><br/> Address:<input type="text" name="Address" value="" /> <br/>\[/code\]-im using the code above, but the problem is, only the last one is saved into the database.Please help,