dianikol Posted January 21, 2008 Share Posted January 21, 2008 hi folks! I really need your help. I have made a database with MYSQL. Then I printed to the screen as a table,the table contains last name and first name,I want to do link the first column. If I click the first name for example it will go to another page which shows in details the user information that i click before, if i click the third name it shows the third user"s information, The link guide to the same page for every user , and that"s the problem, How i the link can understand that i click the first or the third or another user for example???? Please answer soon because i have to make it until this sunday ... Thanks!! P.S.: Sorry for my english ...... Quote Link to comment https://forums.phpfreaks.com/topic/87028-hello-from-greece/ Share on other sites More sharing options...
pdkv2 Posted January 21, 2008 Share Posted January 21, 2008 Create a link on the name field which will point to the detail file and pass the id of the user as a query string Quote Link to comment https://forums.phpfreaks.com/topic/87028-hello-from-greece/#findComment-445041 Share on other sites More sharing options...
dianikol Posted January 21, 2008 Author Share Posted January 21, 2008 I'll apriciate for help but can you show me some code because I' m novice with PHP... Quote Link to comment https://forums.phpfreaks.com/topic/87028-hello-from-greece/#findComment-445043 Share on other sites More sharing options...
pdkv2 Posted January 21, 2008 Share Posted January 21, 2008 the link will look like this <a href="http://hostname/showdetails.php?userid=20">Firstname Lastname</a> in side your table row instaid of only name. in the showdetails.php you can get the userid and fetch the records from database accordingly. Quote Link to comment https://forums.phpfreaks.com/topic/87028-hello-from-greece/#findComment-445058 Share on other sites More sharing options...
dianikol Posted January 21, 2008 Author Share Posted January 21, 2008 Thank you very much my friend!! Quote Link to comment https://forums.phpfreaks.com/topic/87028-hello-from-greece/#findComment-445080 Share on other sites More sharing options...
dianikol Posted January 21, 2008 Author Share Posted January 21, 2008 Any other suggestions would be ok! Quote Link to comment https://forums.phpfreaks.com/topic/87028-hello-from-greece/#findComment-445107 Share on other sites More sharing options...
revraz Posted January 21, 2008 Share Posted January 21, 2008 Really no other suggestions would help, you need to learn how to use $_GET Quote Link to comment https://forums.phpfreaks.com/topic/87028-hello-from-greece/#findComment-445139 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.