my form as the following table (of textfeild). I am feeding the values into these textfeild. How can i enter these values into my database? plz help.
Multiple row inserts in SQL are simply multiple parenthesis with commas, (), (), ();
You are also NOT escaping your data! You must escape ALL your data regardless of text or binary. It is simple and you must never fail to escape data. I escape data even if it's come directly out of my database, a hacker could post code in say a blog comment, it gets commented out, but then for some reason if I handle that comment it could later execute.
$roll = mysql_real_escape_string($_POST['roll');
So just do this...
INSERT INTO table (roll, name, unit_test, prelims, average, attendance, file, interm) VALUES
('$roll','$name','$unit_test','$prelims','$average'=(('$unit_test' + '$prelims')/125) *10,'$attendance','$file','$average'+'$attendance'+'$file'),
('$roll','$name','$unit_test','$prelims','$average'=(('$unit_test' + '$prelims')/125) *10,'$attendance','$file','$average'+'$attendance'+'$file'),
('$roll','$name','$unit_test','$prelims','$average'=(('$unit_test' + '$prelims')/125) *10,'$attendance','$file','$average'+'$attendance'+'$file'),
('$roll','$name','$unit_test','$prelims','$average'=(('$unit_test' + '$prelims')/125) *10,'$attendance','$file','$average'+'$attendance'+'$file');