Jump to content

dynamic URL /script needed for query display help/advice needed


Recommended Posts

I hope this is possible?

I have a script that displays a list of contacts based on a business category (or SIC code).
one of the data columns displayed is the "city".

What I would like to do is hyperlink the displayed "city" name to a script that displays only those contacts  in the same business category or SIC code that are in the "city" that gets clicked on.

The URL/script would have to get two variables from the same record, the "city" (that gets clicked on) and the business "category or SIC code" which is NOT displayed but was originally clicked on the page that returned the display with the "city")....If this is doable, how difficult is it? and can it be done using POST rather than GET ?

In essence... clicking any "city" returns a display of all contacts in the same business category (in the same record) for the city clicked on...

all comments and advice welcome.

you could make a form with a dropdown of the cities and submit it using post method.

Or make a form for each city and the only element in each form is the submit button and you could do like

[code]
<form action = 'target.php' method = 'post'>
  <input type = 'submit' value = 'city1' name = 'city'>
</form>
<br/>
<form action = 'target.php' method = 'post'>
  <input type = 'submit' value = 'city2' name = 'city'>
</form>
.
.
.
[/code]
well you can't use the post method in a url link. Also, I'm not sure what you mean by "get 2 vars from the same record." I don't see how that really ties into your post vs. get problem.

do you mean passing more than 1 variable?

target.php?value1=somevalue&value2=someothervalue
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.