aztec Posted January 2, 2007 Share Posted January 2, 2007 HelloI have seached all of the forums on PHP Freaks to try to find the answer to the following question.Is it possible to turn a name returned from MySQL into a link so the veiwer can click the link to go to another page, or do I need to find a different way to insert the links I need.From what I have read it maybe a combinination of PHP, CSS and HTML may be needed if this can be achieved, I am not even sure if this post is in the correct section or not.Any help or guidance would be gratefully received even if it says it cannot be done.Kind Regards Quote Link to comment https://forums.phpfreaks.com/topic/32593-solved-names-from-mysql-into-links/ Share on other sites More sharing options...
wildteen88 Posted January 2, 2007 Share Posted January 2, 2007 Sure you can. All you need is the HTML code:[code]while($row = mysql_fetch_assoc($SQLRessult)){ echo '<a href="somepage.php?page=' . $row['nameCol']">' . $row['nameCol'] . '</a><br />';}[/code]That it. All you need to do is change that to your needs. If you are unsure post the current code you go here and I'll adapt it for you. Quote Link to comment https://forums.phpfreaks.com/topic/32593-solved-names-from-mysql-into-links/#findComment-151601 Share on other sites More sharing options...
aztec Posted January 2, 2007 Author Share Posted January 2, 2007 Thanks for your input, now I know it can be done I will get to work on it and see how far I can get.I may need your offer of help laterKind Regards Quote Link to comment https://forums.phpfreaks.com/topic/32593-solved-names-from-mysql-into-links/#findComment-151608 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.