I'm hoping this will be a relatively simple one for someone in the know. I've tried as many options as i can think off but i must be missing something. I am attempting to create an insert statement in PHP using a file path which looks like this:
$filename = "images/stories/virtuemart/product/product05.jpg";
My insert statement looks like this:
$insert = 'INSERT INTO `jos_virtuemart_medias`(`virtuemart_vendor_id`, `file_title`, `file_description`, `file_mimetype`, `file_type`, `file_url`,`published`) VALUES (1,'basename($filename)','substr(basename($filename), 0, strrpos(basename($filename), '.'))', images/jpeg, Product, '$filename', 1)';
But its giving me a server error. I have checked the logs and nothing is showing, i also have display errors set at the start of the code. I just can't seem to get the syntax correct.