Where did you copy/paste this script ?
You have defined
Code:
$line
and queryed
Code:
$record
PHP Code:
<HTML>
<HEAD><TITLE>List of Registrations</TITLE><HEAD>
<BODY>
<TABLE BORDER="1">
<tr>
<th>Semester</th>
<th>Subject name</th>
<th>Section</th>
<th>Name</th>
</tr>
<?php
mysql_connect
("---","---","---") or die("Connection Failed");
mysql_select_db("---")or die("Connection Failed");
$name $_POST['card'];

$result mysql_query("select s1.name, s2.subject_name, s3.semester,s4.section " .
"from Student as s1, pelajar as s2, student_subject s3"." where semester = '$name' and"."(s3.matric = s1.matric)
and "
.
" (s2.subject_code=s3.subject_code)");

while (
$line mysql_fetch_array($result))
{

echo 
"<TR align=left>\n";
echo 
"<TD>"$line["semester"], "</TD>",
"<TD>"$line["subject_name"], "</TD>",
"<TD>"$line["section"], "</TD>",
"<TD>"$line["name"], "</TD>";
echo 
"</TR>\n";
}
?>



</TABLE>
</BODY>
</HTML>