ok so i am trying to make a program that is able to viewed on the web using mysql and php together. i have to show a little icon or something saying would you like to view the listing you submitted. this is my program but i keep getting a error as Parse error: syntax error, unexpected T_STRING in /home/bfinnegan/public_html/listclass.php on line 15
here is listclass.php
<?php
include("include.php");
doDB;
if(!$_POST)
{ $display_block="<h1>Select an entry</h1>";
$get_list_sql="SELECT id,
CONCAT_WS(name,last) AS display_name
FROM student_name ORDER BY name, last";
$get_list_res="mysqli_query($mysqli,$get_list_sql)
or die(mysqli_error($mysqli));
if(mysqli_num_rows($get_list_res)<1)
{ $display_block .= "Sorry, no records found";
}else if{
$display_block .= "
<form method=\"post\" action=\"".SERVER["PHP_SELF"]."\">
<p><strong>Select a name to view:</strong><br/>
<select name=\"sel_id\">
<option value=\"\">-- Select One --</option>";
while($recs=mysqli_fetch_array($get_list_fes))
{ $id=recs['id'];
$display_name=stripslashes($recs["display_name"]);
$display_block .="<option value=\"".$id."\">".
$display_name."</option>";
}
$display_block .="
</select>
<input type=\"submit\" name=\"submit\"
value=\"View Selected Name\"></p>
</form>";
}
mysqli_free_result($get_list_res);
} else if($_POST)
{ if($_POST["sel_id"] ==""){
header("Location: listclass.php");
exit;
}
$get_student_sql="SELECT concat_ws(' ',name,last, class_name,class_num,profes,class_name2,class_num2,profes2) as
display_name FROM student WHERE id='".$POST["sel_id"]."'";
$get_student_res=mysqli_query($mysqli,$get_student_sql)
or die(mysqli_error($mysqli));
while($name_info=mysqli_fetch_array($get_student_res))'{
$display_name=stripslashes($name_info['display_name']);
}
$display_block="<h1>Showing List for".$display_name."</h1>";
mysqli_free_result(get_student_res);
$display_block .="<br/>
<p align=\"center\">
<a href=\"".$SERVER["PHP_SELF"]."\">select another</a></p>";
}
mysqli_close($mysqli);
?>
<html>
<head>
<title>Listing</title>
</head>
<body>
<?php echo $display_block; ?>
</body>
</html>