rhock_95 Posted May 15, 2008 Author Share Posted May 15, 2008 no that is the code I am replacing...currently the "city" is not hyperlinked...just plain text this is the latest I have tried ...still no joy echo "<td><a href =\"{$row['city']}\"> $city <a></td>"; Quote Link to comment https://forums.phpfreaks.com/topic/105293-hyperlink-part-of-results-display/page/2/#findComment-542226 Share on other sites More sharing options...
947740 Posted May 15, 2008 Share Posted May 15, 2008 Try: echo "<td><a href =\"".$row['city']."\">".$row['city']."<a></td>"; ? Quote Link to comment https://forums.phpfreaks.com/topic/105293-hyperlink-part-of-results-display/page/2/#findComment-542231 Share on other sites More sharing options...
rhock_95 Posted May 15, 2008 Author Share Posted May 15, 2008 Ok that displays the city and links it to ./city which is not right but it is getting closer... I will work with this for a while and report back...thanks for all the replies and all the efforts so far... stay tuned... Quote Link to comment https://forums.phpfreaks.com/topic/105293-hyperlink-part-of-results-display/page/2/#findComment-542245 Share on other sites More sharing options...
DeanWhitehouse Posted May 15, 2008 Share Posted May 15, 2008 for the code i gave you, the link should be this echo "<td><a href =? .$row['city'].>".$row['city']."<a></td>"; Quote Link to comment https://forums.phpfreaks.com/topic/105293-hyperlink-part-of-results-display/page/2/#findComment-542263 Share on other sites More sharing options...
rhock_95 Posted May 15, 2008 Author Share Posted May 15, 2008 with that I get: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' Quote Link to comment https://forums.phpfreaks.com/topic/105293-hyperlink-part-of-results-display/page/2/#findComment-542273 Share on other sites More sharing options...
DeanWhitehouse Posted May 15, 2008 Share Posted May 15, 2008 echo "<td><a href =? .$row['city'].>".$row['city']."<a></td>"; change to either ?> <td><a href="?<?php echo $row['city]; ?>"><?php echo $row['city];?></a></td> <?php or echo "<td><a href='? ".$row['city']" '>".$row['city']."</a></td>"; if the echo one doesn;t work use the other one, and play around with them to get them to work Quote Link to comment https://forums.phpfreaks.com/topic/105293-hyperlink-part-of-results-display/page/2/#findComment-542283 Share on other sites More sharing options...
rhock_95 Posted May 15, 2008 Author Share Posted May 15, 2008 just more errors... btw...The whole page is a php script "search.php" Quote Link to comment https://forums.phpfreaks.com/topic/105293-hyperlink-part-of-results-display/page/2/#findComment-542296 Share on other sites More sharing options...
DeanWhitehouse Posted May 15, 2008 Share Posted May 15, 2008 what errors?? and can you show the lines where the errors are? Quote Link to comment https://forums.phpfreaks.com/topic/105293-hyperlink-part-of-results-display/page/2/#findComment-542300 Share on other sites More sharing options...
rhock_95 Posted May 15, 2008 Author Share Posted May 15, 2008 they are parse errors on the lines where the "City links" are... FWIW...I use another $row for inhouse referencing...here is the format: echo "<td><a href =\"./searchx.php?query={$row['inventory']}\">inventory?</a></td>"; Quote Link to comment https://forums.phpfreaks.com/topic/105293-hyperlink-part-of-results-display/page/2/#findComment-542332 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.