Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_POST['aku'])){
- $tipefile = $_FILES['gambarbaru']['type'];
- if($tipefile == "image/jpeg" || $tipefile == "image/png" || $tipefile == "image/gif" ){
- include "inc/resize.gambar.php";
- $lokasigambar = $_FILES['gambarbaru']['tmp_name'];
- $namafile = time().$_FILES['gambarbaru']['name'];
- $namafile = str_replace("'","",$namafile);
- move_uploaded_file($lokasigambar,$namafile);
- resize_gambar($namafile,$tipefile);
- echo "$lokasigambar * $tipefile * $namafile";
- $forum->query("UPDATE user SET gambar='$namafile' WHERE id_user='$id_user'");
- if($foto != "static/img/user/default.png"){unlink($foto);}
- header("location:gantidp.php");
- echo "<script>document.location = 'gantidp.php';</script>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement