Jump to content

PHP - passing a variable from a repeated region?


Ender22

Recommended Posts

Hey, I need a little help here.

I'll try to explain what im trying to do as best as I can.

 

I have a repeated region with a 'Name' a 'ID' and a 'Submit' button

 

Repeated Region

------------------------------------------------

{Recordset1.Name}, {Recordset1.ID} |  SUBMIT |

------------------------------------------------

 

so on my page I see every name next to every ID in my database and each one has their own submit button.

 

Now what I need to do is on Submit pass the specific ID of the row in the table for which the submit button was pressed.

 

For example if they scroll down to the 5 element in the repeated region (with ID 5) and they hit Submit I need to pass the number 5 to a function.

 

I understand that you cant call a php function from a button press so I have been trying to do this with the

if(isset($_POST['submit']))

{

// do whatever with the variable.

}

 

statement.

 

Does anyone know how I can do this properly?

 

THANKS! ;D

 

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.