thomasw_lrd Posted June 8, 2012 Share Posted June 8, 2012 I've been using an open source program to store documents on our server (OWl intranet). $sql->query("INSERT INTO $default->owl_files_table (name,filename,f_size,creatorid, updatorid,parent,created, description,metadata,security,groupid,smodified,checked_out, major_revision, minor_revision, url, doctype, approved, expires) values ('$title', '" . addslashes(stripslashes($userfile)) . "', '0', '$userid', '$userid', '$parent', $dCreateDate,'$description', '$metadata', '$security', '$groupid',$smodified,'$checked_out','$major_revision','$minor_revision','1','$doctype','1', '$expires')"); $id = $sql->insert_id($default->owl_files_table, 'id'); I need to know how to extract the filename from this code? Does anybody have any ideas? Like I said, I'm sure this is not the correct place to ask this, but I was hoping someone may be able to help. Link to comment https://forums.phpfreaks.com/topic/263880-probably-not-the-right-place-to-ask-but-here-it-goes-anyways/ Share on other sites More sharing options...
ManiacDan Posted June 8, 2012 Share Posted June 8, 2012 The variable $userfile contains the filename. Link to comment https://forums.phpfreaks.com/topic/263880-probably-not-the-right-place-to-ask-but-here-it-goes-anyways/#findComment-1352281 Share on other sites More sharing options...
thomasw_lrd Posted June 8, 2012 Author Share Posted June 8, 2012 Yeah, I'm an idiot. Thanks for the help. I was so focused on the sql, that I forgot the variables. Link to comment https://forums.phpfreaks.com/topic/263880-probably-not-the-right-place-to-ask-but-here-it-goes-anyways/#findComment-1352283 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.