After connecting, and after you have done the INSERT query, with your current approach with using a Ajax GET request, the following should work.
[quote:2jh1h120]$query =("UPDATE usuarios_aep SET distanciaTotal = '".$distanciaTotal."' WHERE nombreUsuario = '".$_GET['nombreUsuario']."' AND passUsuario = '".$_GET['passUsuario']."' ");
$mysqli->query($query);
I would suggest switching to post methods, otherwise it would become very easy to cheat
I come back with more problems!!
Actually I have this php in my server, I tested it from chrome and it works, makes the UPDATE correctly.
<?php
// Variables
$nombreUsuario = "XXuser";
$passUsuario = "XXpass";
$distanciaTotal = $_GET['distanciaTotal'];
$con=mysqli_connect("blablabla.com","blebleble","bliblibli","blublublu");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$qz =("UPDATE usuarios_aep SET distanciaTotal = '".$distanciaTotal."'
WHERE nombreUsuario = '".$nombreUsuario."'
AND passUsuario = '".$passUsuario."'
");
if (mysqli_query($con, $qz)) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . mysqli_error($con);
}
mysqli_close($con);
?>[/code:2jh1h120]
The problem appears when c2 has send (POST or GET method) the data to php, it seems that I am not sending data at all... so I think that the problem is in the next images (the AJAX connection) but I don't know how to solve it.
[img="http://www.therealgeekgirl.com/server1.jpg"]
[img="http://www.therealgeekgirl.com/server2.jpg"]