1
Hello, I’m having a little problem here maybe easy to solve, but I’m not getting it. I have a first screen (.php students) where will have several search terms, and one of them will be by study time, where will bring me some results from the database. So far everything is working perfectly. Follow the search screen print.
Follow the code to make this search work:
<?php
if($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 we click on the name of the student, a new page is loaded, on this page will have the complete data of the student but with fields for editing where I can work only with this student, register new classes, change data but only this student, is already pulling the ID on the link and loading the new page already with the ID in the URL, but the data does not appear, follow print of the second screen.
It follows part of the code I put:
<?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>
Would you have someone to help me? If so, I will thank you very much.
That’s not what I need, but it’s worth the help
– William De Paula