run query by hyperlink

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jasemhi
Forum Newbie
Posts: 13
Joined: Sun Aug 29, 2004 10:31 pm

run query by hyperlink

Post by jasemhi »

How can I run a query by having a user click on a hyperlink? Is this even possible?

Thanks.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

ummmm, yes?

one possible way is to send a variable to the url, and check if it is set, if so, run the query

ie.

domain.com?query=yes

Code: Select all

if (isset($_GET['query']))
{

//run query

}
jasemhi
Forum Newbie
Posts: 13
Joined: Sun Aug 29, 2004 10:31 pm

THanks

Post by jasemhi »

Thanks. I will play with it. Also, you can use the hidden attribute of a form function right?

I think I got it.
Post Reply