/    Sign up×
Community /Pin to ProfileBookmark

passing an ID field through to PHP

I think this is a PHP question, and not MySQL?

I have a MySQL database which I’m searching via PHP, and it produces a list perfectly well.

I want to be able to click on a button on any of the found records in the list, to go to a detail page for that record.

I have a problem:

The ID field I’m passing as a hidden field is always from the last record in the list, regardless of which record’s button I click. I imgaine this is because by the time the button is pressed, the ID field has been incremented? But how do I get round it please?

Many thanks in advance. 🙂

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@Sid3335Nov 18.2006 — if you have generated a button for each record you can just assign the id to the button/link as you are building your list.
×

Success!

Help @Colm_Osiris spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...