clicar no link, enviando para outra pagina, voltado depois de preenchido o formulario.

Enviada por jorge 
Boa noite, vou tentar explicar meu problema o melhor possível. fiz um programinha, onde a pessoa digita o RG, CPF, Data de nascimento, esse dado digitado pela pessoa confere no banco se realmente existe e joga ela para o HOME.PHP, que nesse arquivo home.php puxa os cursos que a pessoa fez em forma de link, onde a pessoa clica e envia ele para um formulário relativo aquele curso. minha dúvida é: se a pessoa tem dois cursos ou mais, ela clica e preenche, quando ela grava, volta para a tela de CPF, RG, data de nascimento, que é index.php. Gostaria que voltasse para a o arquivo home.php, onde tem mais link para a pessoa preencher, e assim sucessivamente, até acabar. ficando o link que foi preenchido cinza, para não clicar mais. Outro problema, é que quando volta para o arquivo home.php, para pegar outro link para preencher, a identificação da pessoa, que fica no arquivo home.php, some.

Alguém poderia me ajudar.

INDEX.PHP
<body background="red">
<br /><br /><br /><br /><br /><br /><br /><br />
<div align="center">
<img src="imagens/estados.jpg">
</div>


<div class="container" align="center">

<h5 class="panel-title"><h1>Avaliação de Ação Educacional</h1></center></h5>

</div><br /><br />


<form action="verificar.php" method="post" id="aval" align="center">

<label>
RG:<br>
<input type="text" name="rg" required>
</label>

<label>
CPF:<br>
<input type="text" name="cpf" class="frm_number_only" id="cpf">
</label>

<label>
Data de Nascimento:<br>
<input type="text" name="dtnasc" class="required dateBR" id="dtnasc">
</label>

<input type="submit" value="Entrar" class="btn btn-primary">


</form>

HOME.PHP

<?php
session_start();
error_reporting(0);
include "conexao.php";
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta charset="ISO-8859-1">

<title>AVALIAÇÃO DA AÇÃO EDUCACIONAL</title>
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/bootstrap.css" rel="stylesheet">
</head>
<body >




<script src='http://code.jquery.com/jquery-2.1.3.min.js'></script>
<script src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'></script>
<script src="js/jquery-1.11.0.js"></script>


<br /><br /><br />
<form id ="form1" name ="form1" action="formulario.php" method="POST" onsubmit="return enviardados();" >

<h2><center> Seja Bem Vindo a Avaliação </center></h2>

<br/>

<?php
$rg = $_GET['rg'];

$selbanco = "SELECT nome,rg,desc_gh FROM tb_pessoas where rg = $rg";
$querybanco = mysql_query($selbanco);
$resultado = mysql_fetch_array($querybanco);

$nome = $resultado['nome'];
$rg = $resultado['rg'];
$gh = $resultado['desc_gh'];

echo "<strong><center>Nome:</strong> $nome </center><br/>";
echo "<strong><center>RG: </strong> $rg </center><br/>";
echo "<strong><center>GH: </strong> $gh </center><br/>";
echo "<strong><center>CURSOS PARA AVALIAR:";
?>
<br /><br /><br />


<?php
$consulta = mysql_query("select tb_curso.id_curso,tb_curso.desc_curso from tb_curso,tb_avaliacao
where tb_curso.id_curso = tb_avaliacao.cod_curso
and rg = '$rg'");
while ($ln = mysql_fetch_array($consulta))
{
echo '<br/><a href="formulario.php?rg='.$rg.'&curso='.$ln['desc_curso'].'">'.$ln['desc_curso'].'</a>';
}
?>
<div>
<img src="imagens/LOGO.PNG">
</div>

<br>
<div align="center">
<p>
<br>

<!--<input name="botao" type="submit" value="Entrar" class="btn btn-primary">-->
<input type="hidden" name="rg" id="rg" value= <?php echo $rg?> >
<input type="hidden" name="nome" id="nome" value=<?php echo $nome?>>
<input type="hidden" name="gh" id="gh" value=<?php echo $gh?>>

</p>
</div>
</form>

</body>
</html>

FORMULARIO.PHP
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="../css/bootstrap.css" rel="stylesheet">
</head>

<body >
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-primary" >
<div align="center" class="panel-heading"><h1 class="panel-title">AVALIAÇÃO DA AÇÃO EDUCACIONAL</h1></div><br>

<div>
<img width="200px" height="70px" align="right" src="imagens/segurança.jpg">
</div>


<?php
session_start();
error_reporting(0);
include "conexao.php";


$rg = $_GET['rg'];
$curso = $_GET['curso'];


echo "<center><b>Curso:</b> $curso <br/></center>";
echo "<center><b>RG:</b> $rg <br/></center>";

//echo "<center>CURSO: $curso <br/></center>";

?>

<hr align="center" width="100%" size="100" color="black">
<font face="arial" size="4" color="#000000">
<p align="justify"><b><h3>Enumere o questionário de 1 a 5, onde:<h3></b></p>
<ol type="1">
<li> <i>É totalmente insatisfeito;</i>
<li><i>É insatisfeito;</i>
<li> <i>É parcialmente satisfeito;</i>
<li><i>É satisfeito;</i>
<li><i>É plenamente satisfeito.</i>
</ol>
</font>
<hr align="center" width="100%" size="100" color="black">

<form action="gravar.php?funcao=gravar" method="post">

<p>questao 1

<label class="radio-inline">
<input type="radio" name="questao1" value="1"> Nota 1
</label>

<label class="radio-inline">
<input type="radio" name="questao1" value="2"> Nota 2
</label>

<label class="radio-inline">
<input type="radio" name="questao1" value="3"> Nota 3
</label>

<label class="radio-inline">
<input type="radio" name="questao1" value="4"> Nota 4
</label>

<label class="radio-inline">
<input type="radio" name="questao1" value="5"> Nota 5
</label><br><br>
<hr align="center" width="100%" size="100" color="black">


<p>questao 2
<label class="radio-inline">
<input type="radio" name="questao2" value="1"> Nota 1
</label>

<label class="radio-inline">
<input type="radio" name="questao2" value="2"> Nota 2
</label>

<label class="radio-inline">
<input type="radio" name="questao2" value="3"> Nota 3
</label>

<label class="radio-inline">
<input type="radio" name="questao2" value="4"> Nota 4
</label>

<label class="radio-inline">
<input type="radio" name="questao2" value="5"> Nota 5
</label><br><br>
<hr align="center" width="100%" size="100" color="black">


<p>questao 3
<label class="radio-inline">
<input type="radio" name="questao3" value="1"> Nota 1
</label>

<label class="radio-inline">
<input type="radio" name="questao3" value="2"> Nota 2
</label>

<label class="radio-inline">
<input type="radio" name="questao3" value="3"> Nota 3
</label>

<label class="radio-inline">
<input type="radio" name="questao3" value="4"> Nota 4
</label>

<label class="radio-inline">
<input type="radio" name="questao3" value="5"> Nota 5
</label><br><br>
<hr align="center" width="100%" size="100" color="black">

<p>questao 4

<label class="radio-inline">
<input type="radio" name="questao4" value="1"> Nota 1
</label>

<label class="radio-inline">
<input type="radio" name="questao4" value="2"> Nota 2
</label>

<label class="radio-inline">
<input type="radio" name="questao4" value="3"> Nota 3
</label>

<label class="radio-inline">
<input type="radio" name="questao4" value="4"> Nota 4
</label>

<label class="radio-inline">
<input type="radio" name="questao4" value="5"> Nota 5
</label><br><br>
<hr align="center" width="100%" size="100" color="black">

<p> questao 5

<label class="radio-inline">
<input type="radio" name="questao5" value="1"> Nota 1
</label>

<label class="radio-inline">
<input type="radio" name="questao5" value="2"> Nota 2
</label>

<label class="radio-inline">
<input type="radio" name="questao5" value="3"> Nota 3
</label>

<label class="radio-inline">
<input type="radio" name="questao5" value="4"> Nota 4
</label>

<label class="radio-inline">
<input type="radio" name="questao5" value="5"> Nota 5
</label><br><br>
<hr align="center" width="100%" size="100" color="black">

<p> questao 6
<label class="radio-inline">
<input type="radio" name="questao6" value="1"> Nota 1
</label>

<label class="radio-inline">
<input type="radio" name="questao6" value="2"> Nota 2
</label>

<label class="radio-inline">
<input type="radio" name="questao6" value="3"> Nota 3
</label>

<label class="radio-inline">
<input type="radio" name="questao6" value="4"> Nota 4
</label>

<label class="radio-inline">
<input type="radio" name="questao6" value="5"> Nota 5
</label><br><br>
<hr align="center" width="100%" size="100" color="black">


<p>7- Considerações finais da pessoa.</p><br>

<label for="mensagem">
<td><textarea id="mensagem" name="questao7" value="5" rows="10" cols="40">
</textarea><br></td><td width="10"></td>
</label>

<div align="center">
<input type="submit" value="Gravar" class="btn btn-primary">
</div>
</form>

</div>


</body>
</html>
Você precisa estar logado no PHPBrasil.com para poder enviar mensagens para os nossos fóruns.

Faça o login aqui.