cyber15 Posted April 19, 2022 Share Posted April 19, 2022 I'm trying to make a news portal that directs you to different page when you click on 'Read' button. The 'Read' button is a dynamic URL and the problem I'm facing now is when I click 'Read' it applies to all the other 'Read' button, like if I click news_id=2 page it will redirect you to news_id=1 page. I have a database table name 'news' with column news_id, and is it possible to use column news_id to display information on my page? I want it to be like this for example: if news_id=1 then it will go to Storm News page if news_id=2 then it will go to Flood News page but the problem I'm facing now is if news_id=1 it goes to Storm News page if news_id=2 it also goes to Storm News page if news_id=2 it also goes to Storm News page Sorry for my poor English. Quote Link to comment https://forums.phpfreaks.com/topic/314716-need-help-with-displaying-information-on-page-using-id-from-database/ Share on other sites More sharing options...
mac_gyver Posted April 19, 2022 Share Posted April 19, 2022 this is a commonly used method. if your code doesn't work and you cannot determine why, you will need to post all the relevant code needed to preproduce the problem. Quote Link to comment https://forums.phpfreaks.com/topic/314716-need-help-with-displaying-information-on-page-using-id-from-database/#findComment-1595536 Share on other sites More sharing options...
ginerjm Posted April 19, 2022 Share Posted April 19, 2022 What do your buttons do? Take you to a main script and have that script use a header to direct you? Or are you using multiple forms that each have a button in them with a different action attribute on each form to direct you? This would be a lot easier to diagnose if you showed us SOME CODE. Quote Link to comment https://forums.phpfreaks.com/topic/314716-need-help-with-displaying-information-on-page-using-id-from-database/#findComment-1595537 Share on other sites More sharing options...
ginerjm Posted April 19, 2022 Share Posted April 19, 2022 (edited) BTW - what did you do with the solutions that were offered to you last week on a very similar post here? Are you asking this forum's members to waste their time giving you answers that you will only dismiss? Edited April 19, 2022 by ginerjm Quote Link to comment https://forums.phpfreaks.com/topic/314716-need-help-with-displaying-information-on-page-using-id-from-database/#findComment-1595538 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.