Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $title = $_POST["title"];
- str_replace(" ", "_", $title);
- $description = $_POST["description"];
- $image_target = "images/";
- $image_target = $image_target . basename($_FILES['image']['name']);
- $image = ($_FILES['image']['name']);
- $audio_target = "audio/";
- $audio_target = $audio_target . basename($_FILES['audio']['name']);
- $audio = ($_FILES['audio']['name']);
- $video_target = "video/";
- $video_target = $video_target . basename($_FILES['video']['name']);
- $video = ($_FILES['video']['name']);
- $mobile_target = "mobile/";
- $mobile_target = $mobile_target . basename($_FILES['mobile']['name']);
- $mobile = ($_FILES['mobile']['name']);
- move_uploaded_file($_FILES['image']['tmp_name'], $image_target);
- move_uploaded_file($_FILES['audio']['tmp_name'], $audio_target);
- move_uploaded_file($_FILES['video']['tmp_name'], $video_target);
- move_uploaded_file($_FILES['mobile']['tmp_name'], $mobile_target);
- $sqlPut = "INSERT INTO media(title, description, image, audio, video, mobile) VALUES('$title', '$description', '$image', '$audio', '$video', '$mobile')";
- if (mysql_query($sqlPut)) {
- header('Location: index.php');
- }else {
- mysql_error();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement