<?php 


include('../conn.php');


if(isset($_POST['submit'])){
    $data =$_POST['id'];
	$currency =$_POST['currency'];
    $date=$_POST['date'];
    $by=$_POST['by'];


		$sql = "UPDATE `currency` SET `curency`='$currency',`by`='$by',`date`='$date' WHERE id='$data'";
		if(mysqli_query($conn,$sql)){
      echo"<script>alert('You Have Successfully updated Currency'); window.location='../general_settings'</script>";
		}
		else{
		  echo 'Error: '.mysqli_error($conn);
		}
	}
 
