I want to navigate to a section of a php page which is dynamically assigned a section as..
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("somedb") or die(mysql_error());
$data = mysql_query("SELECT * FROM events")
or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
Print "<hr>";
Print "<section id=".$info['title'] .">";
Print "<h1>".$info['title'] . "</h1>";
echo nl2br ( $info['desc'],true ) ;
Print "</section>";}
?>
from this php code
<?php
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("somedb") or die(mysql_error());
$data = mysql_query("SELECT title FROM events")
or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
echo "<a href="events.php#.$info['title'].">"
Print " ".$info['title'] ."";
}
?>
I get an error like
Parse error: syntax error, unexpected 'events' (T_STRING) in C:\xampp\htdocs\IETE\index - Copy.php on line 91
Kindly help :)