Hi Guys, Can you Tell Me What is the wrong of my Code.
This is my Code.

I am Using DOM Extension!

<?php 
    require_once("dompdf/dompdf_config.inc.php");
    $conexion = mysql_connect("localhost","root","");
    mysql_select_db("evaluation",$conexion);

$codeHTML='
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Download</title>
    <link href="css/style.css" rel="stylesheet">
</head>

<body>
<div align="center">
    <table border="1" class="rating">
      <tr>
        <th bgcolor="#0099FF">CORE VALUES</th>
        <th bgcolor="#0099FF">BEHAVIORAL INDICATORS</th>
        <th bgcolor="#0099FF">RATING</th>
        <th bgcolor="#0099FF">OVERALL</th>
        <th bgcolor="#0099FF">PERCENTAGE</th>
      </tr>';
     $codeHTML.='
     if( isset($_POST['trate1']) AND isset($_POST['trate2']) AND isset($_POST['trate3']) AND isset($_POST['trate4']) AND isset($_POST['trate5']) ) {
      teamwork = $_POST['trate1'] + $_POST['trate2'] + $_POST['trate3'] + $_POST['trate4'] + $_POST['trate5'];
      $t1 = $_POST['trate1'] * 100;
      $t2 = $_POST['trate2'] * 100;
      $t3 = $_POST['trate3'] * 100;
      $t4 = $_POST['trate4'] * 100;
      $t5 = $_POST['trate5'] * 100;
      $d = $teamwork * 100;
      <tr>
        <th rowspan="5">TEAMWORK</th>
        <td>Communicates with other personnel in an open (being approachable/amiable), candid, clear, complete, consistent, interactive manner - initiates  response/discussion.  Listens effectively, demonstrates genuine interest in others. </td>
        <td class="overall1" >$t1 %</td>
      </tr>';
}
$codeHTML.='
    </table>
</div>
</body>
</html>';

$codeHTML=utf8_decode($codeHTML);
$dompdf=new DOMPDF();
$dompdf->load_html($codeHTML);
ini_set("memory_limit","500M");
$dompdf->render();
$dompdf->stream("ListadoEmpleado.pdf");
?>

Theres no output, but it says
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\OJT\Evaluation\lista.php on line 26

How to fix it? Please help me. Thanks in Advance!

You have fields within single quotes within the longer string that also uses single quotes. Simplest fix is to use double quotes on line 25 and 38. I don't see a purpose to your closing bracket on line 39.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.