Inserting a link
Posted: Mon Jan 06, 2014 9:18 am
novice learner here am having a problem formatting a link and could use assistance. Ive tried many variations and am thinking it has something to do with quotes but am lost.
First of all. this works for just displaying a URL and a name with it.
My goal is to have clientid=[a value from one of the rows returned from the database] so I did something like this
but I always get a syntax error. As ive said, ive tried many variations of single/double quotes and "/" (escapes) but apparently its not sinking in.
Ive searched this problem and actually saw some old posts with similar issues and I tried to imitate but still ended up with Syntax errors. Really would appreciate some assistance/explanation. Thanks in advance.
First of all. this works for just displaying a URL and a name with it.
Code: Select all
echo "<a href=\'view_client_info.php?clientid=\">" . $row['firstname'] . " " . $row['lastname'];Code: Select all
echo '<a href=\"view_client_info.php?clientid=" . $row['_rowid_'] . "\"> . $row['firstname'] . " " . $row['lastname'] . "</a>'; Ive searched this problem and actually saw some old posts with similar issues and I tried to imitate but still ended up with Syntax errors. Really would appreciate some assistance/explanation. Thanks in advance.