EasyUI Forum
September 14, 2025, 03:17:41 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: mkdir on datagrid entry  (Read 5419 times)
dan
Newbie
*
Posts: 17


View Profile
« on: April 16, 2015, 01:55:44 AM »

Hi Everyone,

I'm trying to create a directory when I add an item using the datagrid form, I'm struggling to get it to work - does anyone know how to do this. For instance I have a project form that adds $id, $name & $company to different columns in the database, I wanted these to be the title of the folder for instance "57 Name Company"

I know that it needs to be along the lines of;-

   echo json_encode(array(
'id'       => mysql_insert_id(),
'name'       => $name,
'company'    => $company
   ));

mkdir("/path/to/directory", 0777, true);

} else {
   echo json_encode(array('errorMsg'=>'Some errors occured.'));
}
?>

Thanks
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!