-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathchange_store.php
More file actions
28 lines (19 loc) · 839 Bytes
/
change_store.php
File metadata and controls
28 lines (19 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
session_start();
$rname = $_POST['restaurant_ka_name'];
$rating = $_POST['restaurant_ka_rating'];
$cuisine = $_POST['restaurant_ka_cuisine'];
$idRes = $_SESSION['partner_id'];
$uploadCvv = 'restaurant/cover/';
$uploadCoverrr = $uploadCvv . basename($_FILES['restaurant_ka_photo']['name']);
$connection=mysqli_connect("localhost","root","","zomato");
$query = "UPDATE `restaurant` SET `r_name` = '$rname', `r_rating` = '$rating', `r_cuisine` = '$cuisine', `r_bg` = '$uploadCoverrr' WHERE `r_id` = '$idRes'";
if (move_uploaded_file($_FILES['restaurant_ka_photo']['tmp_name'], $uploadCoverrr)) {
$result = mysqli_query($connection,$query);
if(!$result){
echo("Nahi hua be");
}else{
header('Location:restaurant.php');
}
}
?>