[code]actually problem is that i search records in mysql a table through ajax code and again insert with further records in another table searching successfull but again insert not successful plz guid me only search seat numbers, type marks mid, lab, terminal and submit with mid lab terminal marks seat numbers
this is main pae
enter_marks.php
[b]Seat Numbers[/b]
//this is insert code
if (!empty($_POST['teacher']))
{
if($search=mysql_query("select Seat_Number from student_enroll where Batch='$_GET[batch]' and Semester='$_GET[semester]' and Degree='$_GET[degree]'"))
{
while($row=mysql_fetch_array($search))
{
$insert="insert into enter_marks_teacher & (Full_Name,Course_Number,Dept_Name,Degree,Batch,Semester,Seat_Number,Mid,Lab,Terminal,Total,Remarks,Percentage,Grade,CGPR) values('$_GET[teacher]','$_GET[course]','$_GET[dept]','$_GET[degree]','$_GET[batch]','$_GET[semester]','$_GET[seat]','$_GET[mid]','$_GET[lab]','$_GET[terminal]','$total','$d','$per','$grade','$gp')";
include_once("connect.php");
if(!mysql_query($insert))
{
die('error in insert query');
}
else
{
echo("1 Record added");
}
}
}
}[/code]