D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
lampp
/
htdocs
/
admin
/
Filename :
editGal.php
back
Copy
<?php require_once ('db.php'); $get_id=$_REQUEST['id']; $moveFile = move_uploaded_file($_FILES["image"]["tmp_name"],"gallery/" . $_FILES["image"]["name"]); $image = $_FILES["image"]["name"]; $alt = $_POST['alt']; // if($moveFile){ // echo "Successfully Move!!!'"; // } $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "UPDATE gallery SET image ='$image',alt='$alt' WHERE id = '$get_id' "; $conn->exec($sql); echo "<script>alert('Successfully Updated!!!'); window.location='gallery.php'</script>"; ?>