Use of http form post

I’m porting a microsoft asp app to WordPress. In it, I was using a form that had four different sort sequences that would change the sql SELECT used to get the data. Here is the html that I’m using to set up the form (removed so that the html would sho

form method=”post” action=”http://xxx.yyy/wp-admin/admin-post.php”
td width=”60″ height=”26″

input type=”submit” value=”Lot #”
input type=”hidden” name=”action” value=”member_directory”
input type=”hidden” name=”data” value=”1″
/td
td width=”154″

input type=”submit” value=”Name”
input type=”hidden” name=”action” value=”member_directory”
input type=”hidden” name=”data” value=”2″
/td

td width=”154″
input type=”submit” value=”Subdivision – Blk / Lot”
input type=”hidden” name=”action” value=”member_directory”
input type=”hidden” name=”data” value=”3″
/td

td width=”96″
input type=”submit” value=”Address”
input type=”hidden” name=”action” value=”member_directory”
input type=”hidden” name=”data” value=”4″
/td

/form

In my admin_post function I have
$request = $_REQUEST[‘data’];

No matter which submit button is clicked the value of $request is 4.

Where am I going wrong?

Read more here:: Use of http form post

Leave a Reply

Your email address will not be published. Required fields are marked *