
Originariamente inviata da
satifal
Ma è così difficile la lingua italiana?
Potresti postare il codice INCLUSIVO delle modifiche da te effettuate?!
Grazie.
La lingua italiana non è molto semplice... 
Questo è il listato comprensivo della modifica che ho provato (la riga $link... e la successiva echo... subito dopo l'estrazione dei dati dal db)
Codice PHP:
<html>
<head>
<meta charset="UTF-8">
<title>Tabella Completa Dischi</title>
</head>
<body>
<?php
$host = 'localhost';
$user = '*******';
$password = '';
$database = '********';
$db = mysql_connect($host, $user, $password) or die ("impossibile connettersi al server $host");
mysql_select_db($database, $db) or die ("impossibile connettersi al database $database");
$query = "select * from lp";
$dbResult = mysql_query($query, $db);
$AffectedRows = mysql_affected_rows($db);
$link=$row['link'];
echo "<a href=\"http://".$link."\" target=\"_blank\">$link</a>";
print "<table border=\"1\" cellspacing=\"0\">\n";
for ($index=0 ; $index<$AffectedRows ; $index++)
{
$row=mysql_fetch_row($dbResult);
if($index==0)
{
print "<tr>\n";
foreach ($row as $k => $v)
{
$myfield = mysql_fetch_field($dbResult,$k);
print ("<td><b>" . $myfield->name . "</b></td>");
}
print "</tr>\n";
}
foreach ($row as $k => $v)
{
print ("<td>$v ");
if ($k==0)
{
print "<br>";
print "<a href=\"modifica.php?id=$v\"><img src=img/update.gif></a>";
print "<br>";
print "<a href=\"cancella.php?id=$v\"><img src=img/iconDelete.gif></a>";
}
print ("</td>");
}
print "</tr>\n";
}
print "</table>\n";
mysql_free_result($dbResult);
mysql_close($db);
?>
</body>
</html>
E questo è il risultato che ottengo (visualizza codice sorgente). Ho messo solo il risultato del primo record estratto.
codice HTML:
<!DOCTYPE html> <!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
--> <html>
<head>
<meta charset="UTF-8">
<title>Tabella Completa Dischi</title>
</head>
<body>
<a href="http://" target="_blank"></a><table border="1"cellspacing="0">
<tr>
<td>1</td>
<td>SPRAWL II (MOUNTAINS BEYOND MOUNTAINS) & READY TO START [RSD]</td>
<td>ARCADE FIRE</td>
<td>SC1</td>
<td>12</td>
<td>EP</td>
<td>S</td>
<td>UK</td>
<td>CAN</td>
<td>PRIMA</td>
<td>602527937670</td>
<td>602527937670</td>
<td>2012</td>
<td>2012</td>
<td>SONO VOX</td>
<td>2</td>
<td>RSD</td>
<td>12</td>
<td>M</td>
<td></td>
<td></td>
<td></td>
<td>www.discogs.com/Arcade-Fire-Sprawl-II-Mountains-Beyond-Mountains-Ready-To-Start/release/35527</td>
</tr>
Non ricevo alcun messaggio d'errore. I record vengono estratti correttamente senza problemi.
Il campo incriminato è l'ultimo, dove è indicato l'URL al sito www.discogs...
Il dato viene correttamente estratto dal db ma non riesco a renderlo cliccabile