Hi i'm creating a website with database in mysql, php and html. The problem there is when i want to explain my datas of the database's table with php and my sql The code that i write is this:
<?php
$link = mysql_connect("localhost","user","psw");
mysql_select_db("my_db",$link);
$result = mysql_query("SELECT * FROM Table ORDER BY Data DESC LIMIT 20",$link);
while($riga = mysql_fetch_array($result))
{
    echo '  <ul id="contenitore">
                <li id="tfigura">$riga["Testo"]</li>
                <li id="efigura">$riga["Eta"]</li>
                <li id="sfigura">$riga["Sesso"]</li>
                <li id="dfigura">$riga["Data"]</li>
            </ul>
          ';
}
?>
But it return not the form (setted with css) but this:
$riga["Testo"]
$riga["Eta"]
$riga["Sesso"]
$riga["Data"]
$riga["Testo"]
$riga["Eta"]
$riga["Sesso"]
$riga["Data"]
...
not the datas of this position.. I try also with this code:
<?php
$link = mysql_connect("localhost","user","psw");
mysql_select_db("my_db",$link);
$result = mysql_query("SELECT * FROM Table ORDER BY Data DESC LIMIT 20",$link);
while($riga = mysql_fetch_array($result))
{
    echo "
            <html>
            <body>
            <div id="contenitore">
                <div id="tfigura">
                    ".$riga["Testo"]."
                </div>
                <div id="efigura">
                    ".$riga["Eta"]."
                </div>
                <div id="sfigura">
                    ".$riga["Sesso"}."
                </div>
                <div id="dfigura">
                    ".$riga["Data"]."
                </div>
            </div>
            </body>
            </html>
         ";
}
?>
but return me the error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /membri/figuralo/pagine/figure.php on line 14 (where is the line ).
How can i solve? thank you!
 
     
    