what's wrong with this code?
Posted: Sat Apr 25, 2009 4:49 pm
Can someone tell me what's wrong with this code? It keeps giving an error that there's an unexpected '<' on line 34 (35 here).... ???
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Candidates' Interview Information</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<?php
$DBConnect = @mysqli_connect("localhost", "root", "pooj0317")
Or die("<p>Unable to connect to the database server.</p>"
. "<p>Error code " . mysqli_connect_errno()
. ": " . mysqli_connect_error()) . "</p>";
$DBName = "interviews";
if (!@mysqli_select_db($DBConnect, $DBName))
die("<p>There is no candidate information!</p>");
$TableName = "candidates";
$SQLstring = "SELECT * FROM $TableName";
$QueryResult = @mysqli_query($DBConnect, $SQLstring);
if (mysqli_num_rows($QueryResult) == 0)
die("<p>There is no candidate information!</p>");
echo "<p>The following candidates have been interviewed:</p>";
echo "<table width='100%' border='1'>";
echo "<tr><th>Name</th><th>Communication Abilities</th><th>Professional Appearance</th><th>Computer Skills</th><th>Business Knowledge</th><th>Interviewer's Comments</th></tr>";
$Row = mysqli_fetch_assoc($QueryResult);
do {
echo "<tr><td>{$CandName['cand_name']}</td>";
echo "<td>{$CommAbil['comm_abil']}</td>";
echo "<td>{$ProfApp['prof_app']}</td>";
echo "<td>{$CompSkills['comp_skills']}</td>";
echo "<td>{$BusKnow['bus_know']}</td>";
echo "<td>{$Comments['comments']}</td>";</tr>
$Row = mysqli_fetch_assoc($QueryResult);
} while ($Row);
mysqli_free_result($QueryResult);
mysqli_close($DBConnect);
?>
</body>
</html>