echo "<form action='responder.php?id='".($Arq)."' method='post'";
Estou tentando passar a variável $Arq como referência para o próximo php, sendo que ela já foi recebida como referência de um php anterior. A primeira passagem, do primeiro para o segundo php, está funcionando corretamente. Mas a segunda passagem, do segundo para o terceiro php, não está funcionando; está passando o id em branco. No que estou errando?
O segundo php está assim:
<html>
<head>
<title>Listando tarefa</title>
</head>
<body>
<?php
$Arq = $_GET['id'];
$banco = "xxxxxx";
$usuario = "xxxxx";
$senha = "xxxxx";
$hostname = "mysql.xxxx.com.br";
echo '<font size="38">';
$conn = mysql_connect($hostname,$usuario,$senha);
if (!$conn) {echo "Não foi possÃvel conectar ao banco MySQL.
"; exit;}
$sel=mysql_select_db($banco,$conn);
if (!sel)
{
echo "Não foi possÃvel abrir o banco de dados";
echo 'MySQL Error: ' . mysql_error();
exit;
}
$sql="SELECT nrtarefa,date_format(data,'%d/%m/%Y'),hora,assunto,tarefa FROM tarefas WHERE nrtarefa='".$Arq."'";
$rs=mysql_query($sql);
if (!$rs)
{exit("Error in SQL");}
$nrec = mysql_num_rows($rs); //total de registros
echo "Tarefa: ".$Arq;
echo '<br>';
echo "Total de registros: ".$nrec;
echo '<br>';
echo "Assunto: ".mysql_result($rs,$i,3);
echo '<br>';
while (mysql_fetch_row($rs))
{
echo "<tr>";
$a=mysql_result($rs,$i,4);
//$data=new DateTime; //mysql_result($rs,$i,1);
echo '<br>';
if(strstr($a,"Resposta"))
{
echo mysql_result($rs,$i,1);
//echo $data->format( 'd-m-Y' ), "/n";
echo " Ã s ";
echo mysql_result($rs,$i,2);
echo " horas: ";
}
echo mysql_result($rs,$i,4);
$i++;
}
mysql_close($conn);
echo "<form action='responder.php?id='".($Arq)."' method='post'";
echo "width='69%' style='height:240px;'>";
echo "<br>";
echo "<br>";
echo "<input size='45' style='font-size:180px' type='submit' id='Responder' value='Responder'>";
echo "</font>";
echo "</form>";
?>
</body>
</html>
E o terceiro php está assim:
<html>
<head>
<title>Responder tarefas</title>
</head>
<br>
<body onbeforeunload='reset_combo()'>
<?php
$Arq= urldecode($_GET['id']);
$tid=$Arq;
?>
<form action="cadresp.php?id=".($tid)." method="post"
width="69%" style='height:200px;'>
<font size="27">
<label>Resposta:</label>
<br>
<input size="40" type="text" name="filtro" id="filtro" style="font-size:150px" value="Digite aqui a resposta" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Digite aqui a resposta';}">
<br>
<br>
<input size="40" style="font-size:150px" type="submit" id="Enviar" value="Enviar">
<BR>
</font>
</form>
</body>
</html>
Alguém me ajuda?