Hello, I have a small problem here, maybe easy to solve, but I can not. I have a first screen (alumn.php) where you will have several search terms, and one of them will be by study time, where they will bring me some results from the database. So far everything works perfectly. Follow the print of the search screen.
Hereisthecodeforthissearchtowork:
<?phpif($startaction==5){if($acao=="search_time") {
if(empty($_POST['select_time'])) {
echo'<script type="text/javascript">abre_modal( \'#dialog\' );</script>';
} else {
//pegar nome via post
$searched_time = $_POST['select_time'];
$result = mysql_query("SELECT * FROM alunos WHERE Dia_Horario LIKE '%".$searched_time."%' " );
$check_time = mysql_num_rows($result);
if($check_time >= 1){
while($ln = mysql_fetch_array($result)) {
$radio = $ln['ID'];
$id = $ln['ID'];
$full_name = $ln['Nome_completo'];
$hora_estudo = $ln['Dia_Horario'];
?>
<div class="scroll-y">
<tr>
<td> <a data-toggle="modal" data-target="#dialog01" href="#<?php echo $radio; ?>"> Clicar Aqui</a></td>
<a href="">
<td>
<?php echo $id; ?>
</td>
</a>
<td>
<a href='http://www.dpaulatreinamentos.com/system/teste03/views/pages/aluno.php?id_aluno=<?php echo $id; ?>' class='nomecompleto' title='".$full_name."'>
<?php echo $full_name ?>
</a>
</td>
<td>
<?php echo $hora_estudo; ?>
</td>
</tr>
</div>
<?php
} } else {
echo'<script type="text/javascript">abre_modal( \'#dialog\' );</script>';
}
}
}
}
?>
After clicking on the student's name, a new page is loaded, this page will have the complete student data, but with fields for editing where I can work with this student only, register new classes, change data but only this student, is already pulling the id in the link and loading the new page already with the ID in the URL, but the data does not appear, it follows print from the second screen.
HereispartofthecodeIput:
<?php$searched_time=$_POST['select_time'];$pegaid=$_GET["ID"];
$result = mysql_query("SELECT * FROM alunos WHERE ID = '$pegaid'" );
$check_time = mysql_num_rows($result);
if($check_time >= 1){
while($ln = mysql_fetch_array($result)) {
$radio = $ln['ID'];
$id = $ln['ID'];
$full_name = $ln['Nome_completo'];
$hora_estudo = $ln['Dia_Horario'];
echo $id;
?>
<form>
<?php echo $pegaid; ?>
<input type="text" class="txt-medium bradius" value="<?php echo $full_name; ?>"/>
<input type="submit" value="Atualizar" class="sb-search-medium" />
</form>
</div>
<footer>
</footer>
Could someone help me? If so, thank you very much.