My article title is a bit misleading but since it is my primary concern so I made that my title.
Anyway,
this is the problem
I have form and it generates a list of people that is needed to be scheduled.
this is (more-or-less) the code.
<?php
$strQuery = "your query";
$result = mysql_query($strQuery);
$x=1;
while($arrResult = mysql_fetch_array($result))
{
?>
<div class="appl_row">
<p><?php echo $arrResult['name_info']; ?></p>
<input type="text" id="txtDate<?php echo $x ?>" name="txtDate<?php echo $x ?>" />
<input type="submit" id="btnsched<?php echo $x; ?>" name="btnsched<?php echo $x; ?>" />
</div>
<?php
$x++;
} ?>
I put the $x variable since the id needs to be unique and the name to be unique.
so if it generates a 20 records from the database.
so in source you will see btnsched1, btnsched2, so on... etc.
so how will I know that I clicked btnsched1? and how will I know that I am getting the value of txtDate1
if you use $_POST['btnsched'] it will just fire an error since you do not have btnsched on the first place.
Did I miss something or do you have suggestion to how my problem could be implemented in a different way?
Thanks For the Reply guys.