View Full Version : help getting php to display mysql tables

08-16-2012, 04:19 AM
here is my script

<style type="text/css">
table {
border: 2px solid red;
background-color: #FFC;

th {
border-bottom: 5px solid #000;

td {
border-bottom: 2px solid #666;
<h1>display data from db</h1>

$sqlget = "SELECT * FROM easports
$sqldata = mysqli_query($dbcon, $sqlget) or die('error');
echo "<table>";
echo "<tr><th>EaEmail</th><th>EaPassword</th></tr>";
while($row = mysqli_fetch_array($sqldata, MYSQLI_ASSOC))
echo "<tr><td>";
echo $row['EaEmail'];
echo "</td><td>";
echo $row['EaPassword']
echo "</td></tr>";
echo "</table>";


and i get this error

Parse error: syntax error, unexpected '>' in C:\xampp\htdocs\admin.php on line 26

help please

08-16-2012, 06:58 AM
You really should learn what all of these errors mean and get a decent programming editor that has built in syntax highlighting.

Take a look at your query. You're missing the closing quote and semi-colon.

$sqlget = "SELECT * FROM easports";

08-17-2012, 07:37 PM
its not a good sight to see such questions being posted here.
apache is giving really helpful message by line number etc, this question should not have been part of this forum.
It is for good of all of us - PHP coders.