0
Hello,
I started programming in PHP these days and I’m not able to return a String from a PHP page that runs in Backend to a PHP page with HTML and present this String
Edited: I will explain the process as a whole to improve the Understanding, I have a PHP initial page that contains only HTML that loads the TXT file for reading in this second PHP page with the code below. I need to return to a php page with HTML and show it to the User
$uploaddir = 'tempArq/';
$uploadfile = $uploaddir . $_FILES['Arquivo']['name'];
if (move_uploaded_file($_FILES['Arquivo']['tmp_name'], $uploadfile)) {
echo "Arquivo Enviado<br/>";
$retorno;
$ponteiro = fopen($uploadfile, "r");
$arr = array();
while (!feof($ponteiro)) {
$linha = fgets($ponteiro, 4096);
array_push($arr, $linha);
if (strlen($linha) >= 10){
$resultado = ConsultaWebserices($linha);
$retorno = "TiqueteID : $linha : Status" + $resultado;
}else {
echo "Tiquete ID $linha Invalido <br/>";
}
}
fclose($ponteiro);
unlink($uploadfile);
I need to take the Value $return and call a PHP page with HTML and present this value in a Table. How do I make this call from the other page and get the $return amount on the other page to Submit.
It seems that this is a function that returns something, you could turn it into a function and only give a Return, or also if that’s not what you want and you want to move with the values through the cookie pages use http://php.net/manualen/features.cookies.php
– Anderson Henrique
concatenation in php is a point (.) so it would be
$retorno = "TiqueteID : $linha : Status ".$resultado;
– adventistaam
This one of yours
if
already works?– adventistaam
You can make in the own page of this processing or send to another page
– adventistaam
Yes If Works, and I already modified the concatenation @adventistaam I don’t understand
– Renan Silveira