<?php if (isset($_FILES['image']['name'])) { $img=$_FILES['image']['name']; $path="../pdf_upload/"; $newimg = $img; move_uploaded_file($_FILES['image']['tmp_name'],$path.iconv('UTF-8', 'TIS-620',$_FILES["image"]["name"])); }else{ echo 'file error'; } $name = '123'; $name_subject = $_POST['name_subject']; $c_subject = $_POST['c_subject']; $c_class = $_POST['c_class']; $y_year = $_POST['y_year']; $t_term = $_POST['t_term']; ?> <script type='text/javascript'> window.location.href = "http://www.kidsbangna.ru.ac.th/insert-data/?newimg=<?php echo $newimg;?>&name_subject=<?php echo $name_subject;?>&c_subject=<?php echo $c_subject;?>&c_class=<?php echo $c_class;?>&y_year=<?php echo $y_year;?>&t_term=<?php echo $t_term;?>"; </script>