Menu
Hi again ?
I have a loop like:
[code=php]
foreach($active_keys as $key)
{
……
}
In each loop, the $f variable changes, i can see this by simply writing echo $f. But $id is the same in each loop.
[code=php]
foreach($active_keys as $key)
{
…..
mysql_query(“insert into photos values (‘$id’,’$f’)”);
…..
}
I execute this, but only the first element can be inserted to the table. But i see that the iteration goes more than 1 times. Why does the mysql_query() function works just once?