このエラーが出ています。
Parse error: syntax error, unexpected 'INTO' (T_STRING)
php
1 <?php 2 if(isset($_FILES['file'])){ 3 4 $name = $_FILE['file']['name']; 5 $type = explode('.',$name); 6 $type = end($type); 7 $size = $_FILES['file']['size']; 8 $tmp = $_FILES['file']['tmp_name']; 9 $random_name = rand(); 10 11 if($type != 'mp4' && $type != 'MP4'){ 12 $message = "This format is not supported."; 13 }else{ 14 move_uploaded_file($tmp,'test_files/'.$random_name.'.'.$type); 15 INSERT INTO files VALUES('','$name','test_files/$random_name.$type'); 16 17 $message = "Succesfully Uploaded."; 18 } 19 20 echo "$message <br/><br/>"; 21 }
どのようにすれば改善されるでしょうか?
よろしくお願いします。
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2016/07/22 05:12