1
Good people, I’m a little behind on my CBT because I can’t upload the image. What I have hj worked and take the photo, save in the gang sqlite the path and latitude and longitude, however I have a screen in my app that I must send an image with a registration, the registration is ok only missing the image. The registration data are sent to a web service in PHP, but I do not know how to send the image, and I have to select the image gallery and send,returning its path and save in the database along with the other data sent form. If anyone can help me I’d appreciate it...
WEB SERVICE CODE
<?php
if($_SERVER["REQUEST_METHOD"]=="POST"){
require 'connect.php';
inReg();
}
function inReg() {
global $connect;
$id_usuario = $_POST["id_usuario"];
$tipo_atividade = $_POST["tipo_atividade"];
$tipo_local= $_POST["tipo_local"];
$quantidade = $_POST["quantidade"];
$query = " Insert into registro_animal(id_usuario, id_tipo_atividade,id_tipo_local,quantidade) values ('$id_usuario','$tipo_atividade','$tipo_local','$quantidade')";
mysqli_query($connect, $query) or die (mysqli_error($connect));
mysqli_close($connect);
}
?>
I know how to do this, but I’m on duty and I can’t help you now! =)
– viana
No stress, the time you can help me will be great, because I’m late on this issue. I’m on hold!
– Juliano Morche
I put an answer and a link at the end that will help you a lot. Practically ready for you, just have to have the tricks to adapt to your code.
– viana