PDA

View Full Version : Using Hyperlinks to Call dynamic pages


doog
March 18th, 2005, 08:38 PM
Does someone have some example code of how to use hyperlinks such as edit and delete to call dynamic pages using the post method? Do I need to use a hinden object?

degsy
March 18th, 2005, 08:55 PM
If you wanted to use a Hyperlink then it would link to a page with a form.
The form would take the query sting variables and you could put them into hidden values.

Huperlink with a query string
edit.php?id=1

---
The script would get the variable and the value

$id = $_GET['id'];


You can then run the SQL Query
UPDATE field where id = '$id'

doog
June 6th, 2005, 06:06 PM
I do not want to use the GET method. Am I able to use hyperlinks to access a page that uses the POST method. If not, how about using buttons. Can I access the id property field of a button? I would like the button to say "edit" and then set the id of the button to primary key of the source table. Code would be very helpful. Thanks,,