Deanznet Posted March 2, 2008 Share Posted March 2, 2008 Okay i got the script to search for images. but im having a hard time to insert keywords into a box and upload it to the db. i can upload random strings into the keyword field but cant figure out how to make the textbox for the multiupload. My keyword text box are names input name="keyword" type="text" size="50" /> The problem is the $keyword part. $extension = $mmhclass->funcs->file_extension($mmhclass->input->file_vars['userfile']['name'][$i]); $filename = ($mmhclass->funcs->random_string(20).".{$extension}"); $keyword = $_POST["keyword"]; $thumbnail = $mmhclass->funcs->thumbnail_name($filename); $filetitle = strip_tags((strlen($mmhclass->input->file_vars['userfile']['name'][$i]) > 20) ? (substr($mmhclass->input->file_vars['userfile']['name'][$i], 0, 20)."...") : $mmhclass->input->file_vars['userfile']['name'][$i]); This Works. $mmhclass->db->query("INSERT INTO `mmh_file_storage` (`filename`, `is_private`, `gallery_id`,`keyword`, `file_title`) VALUES ('{$filename}', '{$mmhclass->input->post_vars['private_upload']}', '{$mmhclass->info->user_data['user_id']}','{$keyword}', '{$filetitle}'); "); Link to comment https://forums.phpfreaks.com/topic/94005-php-and-mysql-keywords/ Share on other sites More sharing options...
Deanznet Posted March 2, 2008 Author Share Posted March 2, 2008 Anyone? Link to comment https://forums.phpfreaks.com/topic/94005-php-and-mysql-keywords/#findComment-481647 Share on other sites More sharing options...
Deanznet Posted March 3, 2008 Author Share Posted March 3, 2008 ??? Please Anyone, I know i ask alot out of this forum and i do appericate it. Link to comment https://forums.phpfreaks.com/topic/94005-php-and-mysql-keywords/#findComment-482103 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.