CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 editable grid file delete

Print topic Send  topic

Author Message
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
View profile  Send private message
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

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.