-
Notifications
You must be signed in to change notification settings - Fork 0
/
othobaupdate.php
53 lines (35 loc) · 1.07 KB
/
othobaupdate.php
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
$servername = "localhost";
$username = "drobbomu_najim10c";
$password = "Mosaddik5450?";
$dbname = "drobbomu_drobbomullo";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
//$sql2 = "SELECT id WHERE item_name ='Broiler Chicken Skin Off ± 50 gm'";
//$result = mysqli_query($conn, $sql2);
//echo $result;
$item_nameE = $_POST['item_name'];
$linkK = $_POST['link'];
$priceE = $_POST['price'];
/*
$item_nameE = "Quail Meat";
$linkK = "ghoradum.com";
$priceE = "789";
*/
$sql = "UPDATE price SET othoba_price = '$priceE' WHERE item_name = '$item_nameE'";
if (mysqli_query($conn, $sql)) {
echo "New record updated successfully in price \n";
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}
$sql2 = "UPDATE link SET othoba_link = '$linkK' WHERE item_name = '$item_nameE'";
if (mysqli_query($conn, $sql2)) {
echo "New record updated successfully in link";
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}
?>