Can't href a link from my table 'ID' column

62 views Asked by At

I am fairly new at PHP and I trying to make the 'ID' field in my HTML table clickable as link to echo a profile page. I'd like to know whats wrong with this code as I copied it straight from another Stack Overflow thread that was voted up.

Hyperlinks within a table - '<a href="">'.$row['username'].'</a>'

What's the proper term for what I am trying to do so I can research it?

 while($row = mysql_fetch_row($result))
                    {
                        echo "<tbody>";
                        echo "<tr>";

                        echo "<td><a href="profile.php?user='.$row['0'].'"></a></td>";
                        echo "<td>$row[1]</td>";
                        echo "<td>$row[2]</td>";
                        echo "<td>$row[3]</td>";
                        echo "<td>$row[4]</td>";
                        echo "<td>$row[5]</td>";
                        echo "<td>$row[6]</td>";
                        echo "<td>$row[7]</td>";

                        echo "</tr>";
                        echo "</tbody>";

                    }
                    mysql_free_result($result);
                    ?>
0

There are 0 answers