Jump to content

Php and Mysql Keywords


Deanznet

Recommended Posts

 

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.