Author
Topic: A little php development help (Read 1977 times)

I'm trying to develop a php page that will allow you to batch set multiple media files with the same picture and attributes. This could be useful for setting the media attributes for episodes for shows and tracks within CDs. I'm new to php and far from a web developer. I put together a page that kind of works but I'm having a problem with variables.

The problem is that after I submit a query to a DB I fill an array with some values. This works fine, but after I do another submit with a different button, the values in the array seem to disappear. Any help will be appreciated. I figured it might be some php gurus in the community.

Here is the code, bear in mind that this is a rough, kind of proof of concept. After I get it to work, I will try to incorporate it into plutoadmin:

for ($i = 0; $i < 10; $i++) { /* simple test to see if anything is in myArray. the array appears to be empty. This is the problem area. Before the second button was clickedthe array had verified values in it.*/echo $myArray[$i]; // the array seems to have lost all previous valuesecho " in loop".$i;}