kirchaj
Posts: 215
|
| Posted: 12/11/2007, 7:56 AM |
|
I have an editable grid that lists uploads by student. The checkbox delete works fine and removes the entry from the database but now I want to take it one step further and remove the file from the file system. I have poked around the forums and not found anything that works so far.
I have tried the Before Build Delete and the After Execute Delete and get the same results.
Here is the code
$userid = $course_cp_student_student1->Hidden1->GetValue();
$stufile = $course_cp_student_student1->stu_upld_filename->GetValue();
$studirpath = $path . $userid . "/".$stufile;
//echo $studirpath;
The student directory path comes out correctly but no file name. If I can get the file name in the path, I think the unlink command will finish it out.
Any ideas on what I am doing wrong?
Thanks
TK
|
 |
 |
datadoit
|
| Posted: 12/11/2007, 3:50 PM |
|
You're going to have to determine what row you're on to get the
control's value. See this tip on how to do that:
http://forums.codecharge.com/posts.php?post_id=60507
|
|
|
 |
|