This commit is contained in:
Kar
2025-01-30 17:03:27 +05:30
parent f7306b70c8
commit a176102cd9
53 changed files with 24 additions and 0 deletions

34
.hta_slug/weather.php Normal file
View File

@@ -0,0 +1,34 @@
<?php
echo 'Weather Report';
?>
<section>
<div>
<form id="cityForm" method="post" enctype="multipart/form-data">
<input name="date" id="date" type="date">
<!-- <select onchange="getWeatherReport()" name="city" id="city" style="background-color: #000;">
<option value="London">London</option>
<option value="Kolkata">Kolkata</option>
<option value="Delhi">Delhi</option>
</select> -->
<button type="submit" name="submit" onsubmit="getCity();"><span>Click</span></button>
</form>
</div>
</section>
<script>
function getWeatherReport(){
let formContent = document.getElementById('cityForm');
let formData = new FormData(formContent)
let url = 'https://apisp.dev2.cicdhosting.com/upload_file/v2/upload-weather.php';
fetch(url,{
method: 'POST',
body: formData,
})
.then(data => data.json())
.then(data => {
console.log(data)
})
.catch(error => {
console.error(error);
})
}
</script>