php - Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on one record? -


i error:

parse error: syntax error, unexpected t_constant_encapsed_string, expecting ',' or ';' in /home/content/72/11648872/html/swtb/secure/talentsearch.php on line 30

however, on second entry in table, others fine. it's confusing hell out of me. it's character or 2 out of place (i'm new php/ajax/jquery).

script:

<?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 candidates candidateid = '".$q."'";  $result = mysqli_query($con,$sql);   while($row = mysqli_fetch_array($result))   {   echo "<div id='talent_result_wrapper'>";   echo "<table>";     echo "<tr>";   echo "<tr><td>" . $row['candidateid'] . "</td></tr>";   echo "<tr><td>" . $row['town'] . "</td></tr>";   echo "<tr><td>" . $row['salarymin'] . "</td></tr>";   echo "<tr><td>" . $row['candidateexperience'] . " years </td></tr>";   echo "<tr><td>" . $row['primarysector'] . "</td></tr>";   echo "</tr>";   echo "</table>";   echo "</div>";   }  mysqli_close($con); ?> 

i've double checked , there's no duff data in database. tried new dataset same info in first , second row.

can please?

this seems problem after all.

swapping quotes.

echo "<div id='talent_result_wrapper'>";  

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -