Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting information from button Post

Status
Not open for further replies.

johnkoutstaal

Programmer
Aug 8, 2006
10
NL
Hello php users,

We are making a page with buttons in tabele cells:

In a loop from a recordset we are placing the buttons in the cells.

<p align="left"><input type="submit" name=<?php echo $values['id']; ?> value="Reply back"></p>

The 'id' is an record id.

If we press on a button how get we back the id that is filled in the name of the button?

We can change the value of "name" and "value" but then the button get the id!

Can someone give us an example script for getting back an id?

Thanks for reading,
John.
 
I would not use a submit button for this.

I suggest you use a standard link, and maybe style it as a button if you need it to look like a button.

For example:

Code:
<a href="processingpage.php?id=<?php echo $values['id']; ?>">Reply back</p>

That way you get an Id variable when the link is pressed.







----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top