Hi guys, I need a little help. I have sat down and studied arrays, but evidentially not good enough.
I found a function that covers my receiving page. It has a piece of code that looks like this:
...WHERE schedule.id IN ('".implode("', '", $id)."')";
And this code takes my $id Array and implodes it and goes on to do the work.
What I can't figure out, is how to create a link with all the $id's stored in an array and then when the user clicks it. All the $id's are sent to the next page and stored into the $id Array so the above code can implode and read them.
Here is what I got and I don't think it's right. Plus on the recieving page, how do I load the results into an Array called $id with the elements seperaed by commas?
$query = "SELECT id FROM schedule WHERE poid = '$search' ";
$result = mysql_query($query, $user_login) or die(mysql_error());
$id = array();
while ($row = mysql_fetch_array($result))
{
$id []= $row;
}
echo "<a href='s_stat_report.php?id=$id'>Print All Status Reports</a>";
I found a function that covers my receiving page. It has a piece of code that looks like this:
...WHERE schedule.id IN ('".implode("', '", $id)."')";
And this code takes my $id Array and implodes it and goes on to do the work.
What I can't figure out, is how to create a link with all the $id's stored in an array and then when the user clicks it. All the $id's are sent to the next page and stored into the $id Array so the above code can implode and read them.
Here is what I got and I don't think it's right. Plus on the recieving page, how do I load the results into an Array called $id with the elements seperaed by commas?
$query = "SELECT id FROM schedule WHERE poid = '$search' ";
$result = mysql_query($query, $user_login) or die(mysql_error());
$id = array();
while ($row = mysql_fetch_array($result))
{
$id []= $row;
}
echo "<a href='s_stat_report.php?id=$id'>Print All Status Reports</a>";