Jump to content

Submit Button Identifier


darkhappy

Recommended Posts

I have a while loop that pulls rows of data from a sql table, and at the beginning if each row I have a button that says "Approve Sheet ID # xxxxx". I want the button to just say "Approve" and attach the unique sheet id some other way in the button without it displaying - do you know if there is a way to do this? Or some other way to get the unique identifier to post without putting it in the value of the "Approve" button?

 

 

<input name="approve" type="submit" class="style4" value="Approve Sheet ID #<?php echo $sheetid?>" />

Link to comment
Share on other sites

Do you want to 'approve' one at a time or do you want to choose multiple items to be approved when you submit the form?

 

I see where you're going with that, I'd like to approve 1 at a time. It's actually easier because its 1 click and just reloads the page.

 

 

 

I think I figured out how though. I can use the "name" parameter as suggested in the first reply, and set the value to "approve". then when i process the script i can run the same query i used to display the approval options to begin with, and use a while loop to cycle through different POST statements until I find a match. i think that would work - assuming i can insert a $var into existing $_POST['var'].........

Link to comment
Share on other sites

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.