Markie
Posts: 251
|
| Posted: 01/14/2009, 2:40 AM |
|
I have an Editable grid with a.o. a checkbox. The name of the checkbox is coverphoto.
the grid has this After Submit custom code:
$Filename = $Container->Filename->GetValue();
$user = $Container->user->GetValue();
$files = $Container->files->GetValue();
copy("users/$user/$files/$Filename", "users/$user/$files.jpg");
The code works perfectly, but it does everytime when the Submit button is clicked. I want to perform the copy command only after the checkbox is checked. I know this is probably easy, but I can't find the solution.
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL |
 |
 |
datadoit
|
| Posted: 01/14/2009, 1:16 PM |
|
if ($Container->YourCheckbox->GetValue() == 1) {
$Filename = $Container->Filename->GetValue();
$user = $Container->user->GetValue();
$files = $Container->files->GetValue();
copy("users/$user/$files/$Filename", "users/$user/$files.jpg");
}
|
|
|
 |
Markie
Posts: 251
|
| Posted: 01/15/2009, 9:23 AM |
|
great, thanks !
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL |
 |
 |
|