0
I would like to send the id I pick up with php and send to a page every 30 seconds...what I’ve done so far:
$idtarefa = $_GET['id'];
get the id, do all the html and ai in javascript I did it:
<script type="text/javascript">
var ajax = new XMLHttpRequest();
ajax.onreadystatechange = function() {
if (ajax.readyState === 4) {
if (ajax.status === 200) {
// Tudo correu bem NA REQUISIÇÃO!
} else {
// debug:
console.log(ajax);
alert('Erro na requisição.');
}
}
}
setInterval(function() {
ajax.open('get', 'atualiza_base2.php?id=<?php echo $idtarefa ?>');
ajax.send();
}, 3000);
</script>
The idea is to update the time every 30 seconds according to the id in a mysql table, I looked at several scripts and went there, but surely there is something wrong that I do not know what is...in the file update_base I wanted to get the id with get dnv
Dude, it didn’t work...: T
– Ricardo Goncalves
Worse than that is the key to an entire system...and I can’t get past that id, banging pin for 2 days already
– Ricardo Goncalves
You can give more information about the error and how it is being implemented?
– Paulo Victor