![]() |
|
#1
|
|||
|
|||
making string data into a variableOK so this quite a comfusing one lemme try set the situation:
I am trying to create a loop to define a string variable that will be used to specify the filename of a file for upload. In the script i'm using, the files in the form are specified as file_name; file2_name; file3_name etc etc to be able to upload multiple files. So the text i'm generating is file_name etc. Take a look at my example code: PHP Code:
now the $whichfile variable is assigned: $file_name; $file2_name; $file3_name to be able to upload the 3 files one at a time (within the loop). My only problem is now when I try to see if the file exists IE if ($file_name) it check the contents of the $whichfile varaible instead of the contents of the contents of the $whichfile variable. In other words, if the content of $whichfile is "$file_upload", how do I use the "$file_upload" as a variable instead of string data? IE if the contents of $whichfile is $file_name and I say: if ($whichfile) I want it to check if $file_name exists and not $whicfile... Any ideas is this even possible to fix...quite a mindjam. |
|||
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Read a .html file, check that file for links | salemite | C Programming Language | 10 | 17-Jan-2008 08:56 |
| Get value for variable name defined as string | mirizar | C Programming Language | 3 | 21-Jun-2004 18:36 |
| [CONTEST?]Data Structure Test | dsmith | C Programming Language | 2 | 06-Jun-2004 16:13 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The