As part of a course I’m enrolled on, I have to extract first names($first_name) and last names($last_name) from a mysql database using php. I then have to display them as hyperlinks (in a html table) that links to a page(view.php) that displays the users’ individual details using the profile id ($profile_id) as a GET response.
I can extract the data and link to view.php but I cannot get the variable values to display as hyperlink text. Instead it displays as code eg: “htmlentities((”$trow[“first_name”]".$trow[“last_name”]))".
Over the past 3 days I have tried various combinations of single and double quotes with concatenation, read php documentation and combed the web to no avail. Its driving me crazy and any help would be much appreciated.
Here is the line of code:
echo ('<a href="view.php?profile_id='.$trow['profile_id'].'">htmlentities(("$trow["first_name"]".$trow["last_name"]))</a>');