Note that there are some explanatory texts on larger screens.

plurals
  1. POParse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on one record?
    primarykey
    data
    text
    <p>I get this error:</p> <p>Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/content/72/11648872/html/swtb/secure/talentsearch.php on line 30</p> <p>However, I only get it on the second entry in the table, the others are fine. It's confusing the hell out of me. Hopefully it's just a character or two out of place (I'm new to PHP/AJAX/JQUERY).</p> <p>script:</p> <pre><code>&lt;?php header("Expires: Tue, 01 Jan 2000 00:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); $q=$_GET["q"]; $con = mysqli_connect('1','2','3','4'); if (!$con) { die('Could not connect: ' . mysqli_error($con)); } mysqli_select_db($con,"ajax_demo"); $sql="SELECT CandidateID, Town, SalaryMin, CandidateExperience, PrimarySector FROM Candidates WHERE CandidateID = '".$q."'"; $result = mysqli_query($con,$sql); while($row = mysqli_fetch_array($result)) { echo "&lt;div id='talent_result_wrapper'&gt;"; echo "&lt;table&gt;"; echo "&lt;tr&gt;"; echo "&lt;tr&gt;&lt;td&gt;" . $row['CandidateID'] . "&lt;/td&gt;&lt;/tr&gt;"; echo "&lt;tr&gt;&lt;td&gt;" . $row['Town'] . "&lt;/td&gt;&lt;/tr&gt;"; echo "&lt;tr&gt;&lt;td&gt;" . $row['SalaryMin'] . "&lt;/td&gt;&lt;/tr&gt;"; echo "&lt;tr&gt;&lt;td&gt;" . $row['CandidateExperience'] . " Years &lt;/td&gt;&lt;/tr&gt;"; echo "&lt;tr&gt;&lt;td&gt;" . $row['PrimarySector'] . "&lt;/td&gt;&lt;/tr&gt;"; echo "&lt;/tr&gt;"; echo "&lt;/table&gt;"; echo "&lt;/div&gt;"; } mysqli_close($con); ?&gt; </code></pre> <p>I've double checked and there's no duff data in the database. I even tried a new dataset with exactly the same info in the first and second row.</p> <p>Can anyone help please?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload