D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
epksuofuukz9
/
www
/
admin
/
php
/
Filename :
add_testimonial.php
back
Copy
<?php session_start(); include("../includes/functions.php"); $name=escape($_POST['name']); $testimonial_review=escape($_POST['testimonial_review']); $cover_image= $_FILES['cover_image']['name']; $cover_image= date('dmYHis').str_replace(" ", "", basename($_FILES['cover_image']['name'])); $cover_image_temp= $_FILES['cover_image']['tmp_name']; move_uploaded_file($cover_image_temp, "../images/testimonial/$cover_image"); $insert="INSERT INTO `testimonial`(`testimonial_name`, `testimonial_image`, `testimonial_review`) VALUES ('$name','$cover_image','$testimonial_review')"; $run=query($insert); confirm($run); if($run) { echo "<script>alert('New Testimonial has been Added');</script>"; echo "<script>window.open('../view_testimonial.php','_self');</script>"; } ?>