hi guys, I've been following the tuts and help on this incredible site for a while and must say that you guys are really amazing and very helpful.
I am learning PHP since it's very useful for site development etc.
I will appreciate any help form you guys on a little project I'm trying my hands on.
I have a flat file data base that i read email addresses from into data table(TD) with check boxes attached to each data.
Is there a way that when a check box is checked it automatically adds that data separated by coma(;) in to a text box one at a time? and if it's unchecked it removes it from the text box.
Thanks for any assistance.
my php code for retrieving data looks like this..
$userinfo = file("list.txt");
echo '<table border="1" cellspacing="2" align="center">';
foreach($userinfo as $key => $val)
{
$data[$key] = explode("||", $val);
}
$bg = '#33CCFF';
for($k = 0; $k < sizeof($userinfo); $k++)
{
echo '"<tr bgcolor=\"#"'. $bg .'"\"><td>'.$k.'</td><td>'.$data[$k][0].'<input type="hidden" name="email" value="'.$data[$k][0].'"></td><td><input type="checkbox" name ="confirm"></td></tr>';
echo '<tr><td colspan=2> </td></tr>';
}
echo '</table>';