question

all_vintage_cards avatar image
0 Likes"
all_vintage_cards asked

Pass Value from Preset HTML Input to Filter

Sorry if this is a dumb question, but here goes. I have succesfully created a page utilizing the api, finding products based on a particular keyword. It's coded in PHP and a part of my wordpress site. I set some price filters in the php code using one of examples from the tutorials. Like this: $filterarray = array( array( 'name' => 'MaxPrice', 'value' => '100000', 'paramName' => 'Currency', 'paramValue' => 'USD'), array( 'name' => 'MinPrice', 'value' => '500', 'paramName' => 'Currency', 'paramValue' => 'USD'), ); I would like to create a few buttons to make this page a bit more interactive, so a user can filter the price themselves. What's best way to create a few buttons to do this and pass the value back to the array? Thanks!
finding-apifilterwordpress
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
helios825 avatar image
0 Likes"
helios825 answered
You'll want to read up on basic HTML forms. They'll send values to your PHP script via URL parameters, then your PHP script can pull them in and use them.
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.