Hi,
I have built an website where user should upload image from mobile. Problem is that user is able to upload image from desktop but can not do that from mobile.
During mobile upload the image is move to the folder but data is not inserted in the table.
I have used the PHP code.
$imagefilename = basename( $_FILES[‘image’][‘name’]);
$image = strip_tags($_FILES[‘image’][‘name’]);
$target_dir = “XXXXXXX”;
$target_file = $target_dir.$imagefilename;
if (move_uploaded_file($_FILES['image']['tmp_name'],WP_CONTENT_DIR.$target_file))
{
$wpdb->insert('wp_tilbud', array(XXXX));}
Can anyone help me to solve the problem?
Thanks in advance.