I'm making a form for admins on my site to submit new videos. the form page has several text boxes (for info like name of video, description, ect.) and a few file upload boxes (for flv video format, mp4 format, ect.)
But when it passes to the next page, when phgp tries to pick up the $_POST data from the form, it's all comming up empty. Take a look:
HTML form:
<form name="vid_form" method="post" enctype="multipart/form-data" action="http://www.mysite.com/videos/vid_manager.php"><br>
Video title: <input type="text" size="20" maxlength="25" name="form_title"><br>
Description: <TEXTAREA name="form_desc" cols=30 rows=4 maxlength="190"></TEXTAREA><br>
Target path: <input type="text" size="15" maxlength="15" name="form_target"> (Expample "desired_dictionary/")<br>
Flv file: <input name="flv_file" type="file" /><br><br>
Mp4 file: <input name="mp4_file" type="file" /><br><br>
Jpg screenshot: <input name="jpg_file" type="file" /><br><br>
<input type="submit" value="Upload Video!" />
PHP code:
$form_title = $_POST['form_title'];
$form_desc = $_POST['form_desc'];
$target_path = $_POST['form_target'];
//upload flv file
$target_path = $target_path . basename( $_FILES['flv_file']['name']);
if(move_uploaded_file($_FILES['flv_file']['tmp_name'], $target_path)) {
$err_check[1] = "SUCCESS";
} else{ $err_check[1] = "FAILED"; }
//upload mp4 file
$target_path2 = $target_path2 . basename( $_FILES['mp4_file']['name']);
if(move_uploaded_file($_FILES['mp4_file']['tmp_name'], $target_path2)) {
$err_check[2] = "SUCCESS";
} else{ $err_check[2] = "FAILED"; }
//upload jpg screenshot
$target_path3 = $target_path3 . basename( $_FILES['jpg_file']['name']);
if(move_uploaded_file($_FILES['jpg_file']['tmp_name'], $target_path3)) {
$err_check[3] = "SUCCESS";
} else{ $err_check[3] = "FAILED"; }
Does anyone have any ideas for why it's not passing the data? Thanks! I've been battling with this all afternoon.