I'm new to php and struggling with some syntax issues the most recent of which is:
Parse error: syntax error, unexpected '"' in C:\xampp\htdocs\worry\worryget.php on line 26
Line 26 starts with "echo" in th code below. I've tried several different constructions and read a pile of posts but the error had persisted and I've run out of ideas.
I'd really appreciate a little help.
Thanks in advance,
Phil
<?php
// Submits the most recent worry
//require(config.php);
$dbhost = "localhost";
$dbuser = "root";
$dbpassword = "";
$dbdatabase = "wailingwall";
$con = mysql_connect($dbhost,$dbuser,$dbpassword)or die('Could not connect: ' . mysql_error());
mysql_select_db($dbdatabase, $con) or die ("Could not select database: ".mysql_error());
//mysql_close($con);
//Displays posted worries
$sql="SELECT name, body FROM worries";
$result = mysql_query($sql,$con);
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
****echo "Name : $row[name] <br>" .
"Body : $row[body] <br><br>";
}
?>