Title: mkdir on datagrid entry Post by: dan 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 |