slashpine Posted December 10, 2006 Share Posted December 10, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/30135-dynamic-url-script-needed-for-query-display-helpadvice-needed/ Share on other sites More sharing options...
.josh Posted December 10, 2006 Share Posted December 10, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/30135-dynamic-url-script-needed-for-query-display-helpadvice-needed/#findComment-138541 Share on other sites More sharing options...
slashpine Posted December 10, 2006 Author Share Posted December 10, 2006 I was trying to not have to add another form....I was hoping to use a URL (link) but it will have to get two variables fromt the same record.. Quote Link to comment https://forums.phpfreaks.com/topic/30135-dynamic-url-script-needed-for-query-display-helpadvice-needed/#findComment-138551 Share on other sites More sharing options...
.josh Posted December 10, 2006 Share Posted December 10, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/30135-dynamic-url-script-needed-for-query-display-helpadvice-needed/#findComment-138562 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.