Jump to content

Need help with displaying information on page using ID from database


Recommended Posts

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.

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.

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 by ginerjm
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.