Hi!
I've got a question:
I've got this form that takes an artist name the name of the album and the number of tracks the album has. After submitting this infor a have a function that takes the number of tracks and produces the form with the appropriate number of text fields, 1 for each track like this:
function add_tracks($numtracks)
{
print("<form action=add.php method=post>");
print("<table><tr><td>Track No</td><td>Track Name</td></tr>");
for($i=1; $i<=$numtracks; $i++)
{
print("<tr><td>");
print("<input type=text name=trackno value=$i size=2></td>");
print("<td><input type=text name=track_name size=30></td></tr>");
}
print("<tr><td><input type=submit name=done value=Done></td></tr>");
print("</table>");
print("</form>");
}
as you can see, the name of the track is held in a variable called track_name.
So I have two questions, does the track_name become an array, to my understanding it does, and secondly, how do I use this variable?
I do a check
if($done == "Done)
{
print($track_name[3]);
}
just to check but there is now value. This is all on the same page, add.php.
so why can't I see the varibable, and if I'm doing this all wrong, what can I do differently to get this to work properly?
Many thanks.