So I am using php 5.6 for a project. I am printing data from a mySQL database into a table:
echo "<tr>
<a href='javascript:movieCookieCreator()' id='".$row["dir"]."'>
<td>".$row["name"]."</td>
</a>
<td>".$row["genre"]."</td>
</tr>";
the id tag in the code above is used to store a directory for a movie, however, the row and its elements are not appearing as links.
This is the raw HTML as it is printed,
<center>
<table>
<tr>
<th>Title</th>
<th>Genre</th>
</tr>
<tr>
<a href='javascript:movieCookieCreator()' id='/movies/Shrek.mp4'>
<td>Shrek</td>
</a>
why is it not a link? and can the id tag be used to store data for javascript functions?