I have seen some solutions to this, but none that seem to work in my case, as I'm not trying to display any quotation marks.
For the record, there is probably some other method of doing this that I'm just not thinking of right now, so alternative solutions are definitely welcome!
I have a table that is generated from a MySQL database, and i want to make each row (tr) clickable. I had already done this, but i made the td tags clickable instead, which didn't work as well since i had to click the text, not anywhere in the container.
This is what i did for the td tags
echo '<td><a href="case.php?id=' . $row['id'] . '">' . $row['time'] . '</a></td>';
This worked as i said, but i had to click the text itself, so i scrapped the idea. Using the same method (a tags) for the tr tags is not supported, and nothing happens if i try using that method.
This is what i have tried doing to the tr tags now.
echo '<tr onclick="window.location="case.php?id=' . $row['id'] . '";"';
This doesn't work, as the onclick quotation mark is closed by the window location quotation mark.
Is there some other way to set the window location? Or can i use some other method to redirect the user?