So this is beyond confusing for me. I have a page (index.php) that has rows. The rows print out looking like this
And so on...as you can see from the code below I have added debugging statements to show the passID (800 numbers) and the rowID(sequential)
echo "{$row['ID']}";
echo"
<form action=\"./functions/email.php\" id='passForm' method='post'>
<input type='hidden' id='passID' name='passID' value='{$row['ID']}'/>
<input type='hidden' id='rowID' name='rowID' value='$rowID'/>
<button type=\"submit\" form=\"passForm\" value=\"Submit\" style=\"height:25px; width:75px\">Pass</button>
</form>";
echo "$rowID";
When I click on a particular row (let's say 860 as shown in the developer console here)
When we view our results on the email.php page using the code
$projectID = $_POST['passID'];
$rowID = $_POST['rowID'];
echo $projectID;
echo "<br />";
echo $rowID;
We see that the value has changed to 865 and row 1 instead of the expected 860 and row 3?!
This makes NO sense to me. How can this be happening? The html page renders with the row values correct as shown in the debug screenshot so how is it that the code is just picking up the top row on the next page. What is going on??!
As you can see, any help would be greatly appreciated lol because I may or may not go crazy staring at this!
id
s? i.e.passForm
These should be unique to each form. – Owensby