in reply to Re: Re: Re: Adding and Deleting Upload File name and File
in thread Adding and Deleting Upload File name and File
Whatever is selected is then passed on to another subroutine that takes the value of "file" and deletes the file# brings in arrays song_title and song_files &song_list; &file_list; #works by single elements my %test = ($song_titles[0], $song_files[0], $song_titles[1], $song_files[1]); foreach my $key (keys %test) { print qq[<br> Delete this File: $key <INPUT TYPE="checkbox" NAME=" +files" VALUE="$test{$key}">\n]; }
However I still can't figure out how I would delete the song title that goes with the song file. How could I also pass the value of the key (song_title) along with the song file? also I tried doing# check for tainted data my $files = $q->param( "files") || error( $q, "couldn't read File valu +e"); $files =~ /^([\/.\w.]+)$/; # The "untainted" file is now in $1 $files = $1; die "Bad filename" unless $files; foreach ($files){ unlink($_); }
however, it printed out the first key right (song_title) but the next key contained the song file as the key and so on ... thanks in advance...my %test = (@song_titles, @song_files);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Adding and Deleting Upload File name and File
by larryk (Friar) on Dec 05, 2001 at 19:13 UTC | |
by lex2001 (Sexton) on Dec 06, 2001 at 14:33 UTC | |
by larryk (Friar) on Dec 07, 2001 at 15:43 UTC |