first row only from multiple rows - form
<p>Using the following code I am only getting the first row into the database.
Looked at many examples but I still cannot see where I am going wrong.</p>

<pre><code>// one box for each //

&lt;input class="bginput" name="album_name[]" size="30" type="text"&gt;

&lt;imput type="submit" Value="submit"&gt;



&lt;?PHP
foreach($_POST['artist_id'] as $row=&gt;$val) {
$artist_id      = mysql_real_escape_string($val);
$album_name     = mysql_real_escape_string($_POST['album_name'][$row]);
$image_album_id = mysql_real_escape_string($_POST['image_album_id'][$row]);
$track          = mysql_real_escape_string($_POST['track'][$row]);
$song_name      = mysql_real_escape_string($_POST['song_name'][$row]);
$duration       = mysql_real_escape_string($_POST['duration'][$row]);


$sql = mysql_query("INSERT INTO songs (`image_album_id`, `member_id`, `artist_id`,      `album_name`, `track`, `song_name`, `duration`, `timestamp`)
VALUES ('$image_album_id', '".$_SESSION['member_id']."','$artist_id','$album_name', '$track', '$song_name', '$duration', UNIX_TIMESTAMP() )") or die(mysql_error());

header ('Location: song_details_add.php?success');
exit();
?&gt;
</code></pre>

<p>Thanks.</p>
