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
https://forums.phpfreaks.com/topic/105126-submit-button-identifier/
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'].........

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.