-
Total de itens
55 -
Registro em
-
Última visita
Tudo que Murilo Cabral postou
-
Resolvemos galera,srsrsrsr fogos, muitos fogos rsrsrsrs Eu estava usando $matricula = $_GET['matricula'];, quando o certo era - $matricula = $_GET['id']; -. na pagina publicar_notas_3.php *Errado $matricula = $_GET['matricula']; $query = mysql_query("SELECT * FROM historico where matricula = '$matricula'"); $res = mysql_fetch_array($query); *Correto $matricula = $_GET['id']; $query = mysql_query("SELECT * FROM historico where matricula = '$matricula'"); $res = mysql_fetch_array($query); Agora funcionou beleza. Muito obrigado pelas dicas, que foram de suma importância para o resulta positivo. Grande abraço, e até a proxima. Murilo Cabral
-
Lucke e Blew, fiz o que vocês. sugeriram, porém não não deu certo, pois continua a direcionar a pagina publicar_notas_3.php sem os dados do aluno selecionado na pagina publicar_notas_2.php. Ele agora seleciona sempre o primeiro ID, ou seja o primeiro que ele encontra pela frente. Dados dos alunos cadastrados: Aluno Murilo Cabral - login=murilo / senha=123 / matricula=100164 Aluno Juliana Cabral - login=buju / senha=123 / matricula=170738 Linha na pagina publicar_notas_2.php: <td><a href="publicar_notas_3.php?id=<? echo $matricula; ?>">Notas</td> Linha na pagina publicar_notas_3.php: <? include '../conexao.php'; $matricula = $_GET['matricula']; $query = mysql_query("SELECT * FROM historico WHERE matricula = '$matricula'"); $res = mysql_fetch_array($query); ?> Ou seja, não estou sabendo criar o link para cada aluno selecionado!!! Mas uma vez peço um HEEELPPP para vocês. Se possível um passo a passo de como fazer ou um script que eu possa inserir para solucionar o problema. Para verificar o que esta ocorrendo acesse: http://www.pbfjacarepagua.com.br/boletim/p...%AA%20-%20Tarde Desde já agradeço a compreensão e a paciência de ambos. Murilo Cabral
-
Eu já consegui fazer com que os dados sejam visualizados via input para que eu possa fazer as alterações necessárias. Porém agora sempre que eu clico em um determinado aluno, o sistema me manda sempre o mesmo aluno. Peço mais um HELP para a galera. Estou enviando os códigos das paginas, para que vocês. possam me dar esse HELP: Rsrsrsr E desculpe pela minha inexperiência e abuso, rsrsrsr Pagina – publicar_notas_2.php <? $nome_da_turma = $_GET['nome_da_turma']; include '../conexao.php'; $select_aluno = mysql_query("SELECT * FROM usuarios WHERE nome_da_turma = '$nome_da_turma'"); $count = mysql_num_rows($select_aluno); if($count == ''){ }?> <table> <tr> <td colspan=3"><strong>Existe <? echo $count; ?> aluno(s) cadastrado(s) no Nível <? echo $nome_da_turma; ?></strong></td> <? while($res = mysql_fetch_array($select_aluno)){ $aluno = $res['nome]; $matricula = $res['matricula']; ?> </tr> <tr> <td></td> <tr> <td></td> </tr> <tr> <td></td> </tr> <tr> <td><h2>Nome do Aluno:</h2></td> <td><h2>Matrícula:</h2></td> </tr> <tr> <td><h1><? echo $aluno; ?></h1></td> <td><h1><? echo $matricula; ?></h1></td> <td><a href=publicar_notas_3.php?id=<? echo $matricula = $res['matricula]; ?>">Notas</td> </tr> <? } ?> </table> E continuando com as paginas: Pagina – publicar_notas_3.php <? include '../conexao.php'; $id = $_GET['id']; $matricula = $_GET['matricula']; $query = mysql_query("SELECT * FROM notas"); $res = mysql_fetch_array($query); ?> <table> <tr> <td><h2>Nome do aluno:</h2></td> <td><h1><? echo $res['nome']; ?></h1></td> <tr> <td><h2>Matricula:</h2></td> <td><h1><? echo $res['matricula']; ?></h1></td> </tr> <tr> <td><h2>Nível:</h2></td> <td><h1><? echo $res['nome_da_turma']; ?></h1></td> </tr> </table> </div><!-- conteudo --> <div id=conteudo_notas"> <? include '../conexao.php'; $id = $_GET['id]; $matricula = $_GET['matricula']; $query = mysql_query("SELECT * FROM notas"); $res = mysql_fetch_array($query); ?> <form name=enter" method="post" action="" enctype="multipart/form-data"> <table class="table"> <tr> <td><h1 class="h1">EVALUATION</h1></td> </tr> <tr> <td><h2>Written Mark</h2></td> <td><input type="text" name="lesson4_3" value="<? echo $res['lesson4_3]; ?>" /></td> </tr> <tr> <td><h2>Oral Mark</h2></td> <td><input type="text" name="lesson4_5" value="<? echo $res['lesson4_5']; ?>" /></td> </tr> <tr> <td></td> </tr> <tr> <td></td> </tr> <tr> <tr> <td><h2>Lesson</h2></td> <td><h1>Pronunciation</h1></td> <td><h1>Reading</h1></td> <td><h1>Vocabulary</h1></td> <td><h1>Speaking</h1></td> <td><h1>Handwriting</h1></td> </tr> <tr> <td><h2>4</h2></td> <td><input type=text" name="pronun4" value="<? echo $res['pronun4]; ?>" /></td> <td><input type="text" name="read4" value="<? echo $res['read4']; ?>" /></td> <td><input type=text" name="voca4" value="<? echo $res['voca4]; ?>" /></td> <td><input type="text" name="speak4" value="<? echo $res['speak4']; ?>" /></td> <td><input type=text" name="hand4" value="<? echo $res['hand4]; ?>" /></td> </tr> <tr> <td><h2>8</h2></td> <td><input type="text" name="pronun8" value="<? echo $res['pronun8']; ?>" /></td> <td><input type=text" name="read8" value="<? echo $res['read8]; ?>" /></td> <td><input type="text" name="voca8" value="<? echo $res['voca8']; ?>" /></td> <td><input type=text" name="speak8" value="<? echo $res['speak8]; ?>" /></td> <td><input type="text" name="hand18" value="<? echo $res['hand8']; ?>" /></td> </tr> <tr> <td><h2>12</h2></td> <td><input type=text" name="pronun12" value="<? echo $res['pronun12]; ?>" /></td> <td><input type="text" name="read12" value="<? echo $res['read12']; ?>" /></td> <td><input type=text" name="voca12" value="<? echo $res['voca12]; ?>" /></td> <td><input type="text" name="speak12" value="<? echo $res['speak12']; ?>" /></td> <td><input type=text" name="hand12" value="<? echo $res['hand12]; ?>" /></td> </tr> <tr> <td><h2>16</h2></td> <td><input type="text" name="pronun16" value="<? echo $res['pronun16']; ?>" /></td> <td><input type=text" name="read16" value="<? echo $res['read16]; ?>" /></td> <td><input type="text" name="voca16" value="<? echo $res['voca16']; ?>" /></td> <td><input type=text" name="speak16" value="<? echo $res['speak16]; ?>" /></td> <td><input type="text" name="hand16" value="<? echo $res['hand16']; ?>" /></td> </tr> <tr> <td></td> </tr> <tr> </tr> </table> <div id=conteudo_aprov"> <? include '../conexao.php'; $id = $_GET['id]; $matricula = $_GET['matricula']; $query = mysql_query("SELECT * FROM notas"); $res = mysql_fetch_array($query); ?> <table> <tr> <td><h2>Aprovado para:</h2></td> <td><input type=text" name="aprov" value="<? echo $res['aprov]; ?>" /></td> </tr> <tr> </tr> </table> </div><!-- conteudo_aprov --> <td><input class="input" type="submit" name="enter" value="Atualizar" /></td> </form> <? if(isset($_POST['enter'])){ $id = $_POST['id']; $nome = $_POST['nome']; $matricula = $_POST['matricula']; $nome_da_turma = $_POST['nome_da_turma']; $lesson4_3 = $_POST['lesson4_3']; $lesson4_5 = $_POST['lesson4_5']; $pronun4 = $_POST['pronun4']; $pronun8 = $_POST['pronun8']; $pronun12 = $_POST['pronun12']; $pronun16 = $_POST['pronun16']; $read4 = $_POST['read4']; $read8 = $_POST['read8']; $read12 = $_POST['read12']; $read16 = $_POST['read16']; $voca4 = $_POST['voca4']; $voca8 = $_POST['voca8']; $voca12 = $_POST['voca12']; $voca16 = $_POST['voca16']; $speak4 = $_POST['speak4']; $speak8 = $_POST['speak8']; $speak12 = $_POST['speak12']; $speak16 = $_POST['speak16']; $hand4 = $_POST['hand4']; $hand8 = $_POST['hand8']; $hand12 = $_POST['hand12']; $hand16 = $_POST['hand16']; $aprov = $_POST['aprov']; include '../conexao.php'; $up_nota = mysql_query("UPDATE notas SET nome = '$nome', matricula = '$matricula', nome_da_turma = '$nome_da_turma', lesson4_3 = '$lesson4_3', lesson4_5 = '$lesson4_5', pronun4 = '$pronun4', read4 = '$read4', voca4 = '$voca4', speak4 = '$speak4', hand4 = '$hand4', pronun8 = '$pronun8', read8 = '$read8', voca8 = '$voca8', speak8 = '$speak8', hand8 = '$hand8', pronun12 = '$pronun12', read12 = '$read12', voca12 = '$voca12', speak12 = '$speak12', hand12 = '$hand12', pronun16 = '$pronun16', read16 = '$read16', voca16 = '$voca16', speak16 = '$speak16', hand16 = '$hand16', aprov = '$aprov' WHERE id = '$id' AND matricula = '$matricula'"); $query_insert = mysql_query("INSERT INTO notas (lesson4_3, lesson4_5, pronun4, read4, voca4, speak4, hand4, pronun8, read8, voca8, speak8, hand8, pronun12, read12, voca12, speak12, hand12, pronun16, read16, voca16, speak16, hand16, aprov) VALUES ('$lesson4_3', '$lesson4_5', '$pronun4', '$read4', '$voca4', '$speak4', '$hand4', '$pronun8', '$read8', '$voca8', '$speak8', '$hand8', '$pronun12', '$read12', '$voca12', '$speak12', '$hand12', '$pronun16', '$read16', '$voca16', '$speak16', '$hand16', '$aprov' WHERE matricula = $matricula')"); if($up_nota == ''){ echo "<script language='javascript'> window.alert('Erro ao alterar dados!'); </script>"; }else{ echo "<script language='javascript'> window.alert('Dados alterados com sucesso!'); window.location''; </script>"; }}?> </div><!-- conteudo_notas --> </body> </html> Entre nesse endereço para ver o que esta acontecendo. Pois quando eu seleciono um determinado aluno, ele manda sempre o mesmo aluno com resposta. http://www.pbfjacarepagua.com.br/teste/bol...licar_notas.php Desde já fica aqui os meus agradecimentos para a galera. Murilo Cabral
-
Cara eu peguei uma aula via YouTube, e me aventurei. Deu para perceber claramente o quanto inexperiente que sou. Eu preciso fazer com que os dados de notas de cada aluno apareça dentro do input do formulário para que eu possa efetuar as alterações ou atualizações. Se vc. puder entrar no endereço http://www.pbfjacarepagua.com.br/teste/bol...car_notas_2.php vc. verá que já existe um aluno cadastrado com sua noras, porém quando eu clico em NOTAS deveria aparecer a pagina referente ao aluno e com sua notas vindo do BD cada uma em seu input para que eu possa altera-las. Sei que é muito abuso de minha parte, mas tem como vc. me da um help mediante ao que pretendo fazer? Desde já agradeço, e muito..... Murilo Cabral
-
Olá, estou tendo problema para obter os registros do BD pelo input usando o PHP para que eu possa altera-los sem ter de entrar pelo CPanel. Peço um HELP. Abaixo esta os codigos da pag_update. desde já meus agradecimentos. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><? include '../conexao.php'; ?> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>.: Publicar Notas 3 :.</title> <link href="css/publicar_notas_3.css" rel="stylesheet" type="text/css" /> </head> <div id="body"> </div><!-- body --> <body> <div id="topo"> </div><!-- topo --> <div id="box"> </div><!-- box --> <div id="menu"> <ul> <li><a href="http://www.pbfjacarepagua.com.br/teste/boletim/professor/index.php">Cadastro de Alunos</a></li> <li><a href="http://www.pbfjacarepagua.com.br/teste/boletim/professor/turmas.php">Cadastrar Turmas</a></li> <li><a href="http://www.pbfjacarepagua.com.br/teste/boletim/professor/publicar_notas.php">Lançar Notas</a></li> <li><a href="http://www.pbfjacarepagua.com.br/teste/boletim/">Sair do Painel</a></li> </ul> </div><!-- menu --> <div id="conteudo"> <? $matricula = $_GET['matricula']; $notas = $_GET['notas']; include '../conexao.php'; $select = mysql_query("SELECT * FROM notas WHERE matricula = '$matricula'"); while($res = mysql_fetch_array($select)){ $nome = $res['nome']; $matricula = $res['matricula']; $nome_da_turma = $res['nome_da_turma']; $login = $res['login']; $lesson4_3 = $res['lesson4_3']; $lesson4_5 = $res['lesson4_5']; $pronun4 = $res['pronun4']; $pronun8 = $res['pronun8']; $pronun12 = $res['pronun12']; $pronun16 = $res['pronun16']; $read4 = $res['read4']; $read8 = $res['read8']; $read12 = $res['read12']; $read16 = $res['read16']; $voca4 = $res['voca4']; $voca8 = $res['voca8']; $voca12 = $res['voca12']; $voca16 = $res['voca16']; $speak4 = $res['speak4']; $speak8 = $res['speak8']; $speak12 = $res['speak12']; $speak16 = $res['speak16']; $hand4 = $res['hand4']; $hand8 = $res['hand8']; $hand12 = $res['hand12']; $hand16 = $res['hand16']; $aprov = $res['aprov']; }?> <form name=enter" method="post" action="" enctype="multipart/form-data"> <table class="table"> <tr> <td><h2 class="h1">Nome do aluno:</h2></td> <td><h1><? echo $nome; ?></h1></td> </tr> <tr> <td><h2 class="h1">Matricula:</h2></td> <td><h1><? echo $matricula; ?></h1></td> </tr> <tr> <td><h2 class="h1">Nível:</h2></td> <td><h1><? echo $nome_da_turma; ?></h1></td> </tr> </table> </form> </div><!-- conteudo --> <div id="conteudo_notas"> <form name="enter" method="post" action="" enctype="multipart/form-data"> <table class="table"> <tr> <td><h1 class="h1">EVALUATION</h1></td> </tr> <tr> <td><h2>Written Mark</h2></td> <td><input type="text" name="lesson4_3" value="<? echo $lesson4_3; ?>" /></td> </tr> <tr> <td><h2>Oral Mark</h2></td> <td><input type="text" name="lesson4_5" value="<? echo $lesson4_5; ?>" /></td> </tr> <tr> <td></td> </tr> <tr> <td></td> </tr> <tr> <tr> <td><h2>Lesson</h2></td> <td><h1>Pronunciation</h1></td> <td><h1>Reading</h1></td> <td><h1>Vocabulary</h1></td> <td><h1>Speaking</h1></td> <td><h1>Handwriting</h1></td> </tr> <tr> <td><h2>4</h2></td> <td><input type="text" name="pronun4" value="<? echo $pronun4; ?>" /></td> <td><input type="text" name="read4" value="<? echo $read4; ?>" /></td> <td><input type="text" name="voca4" value="<? echo $voca4; ?>" /></td> <td><input type="text" name="speak4" value="<? echo $speak4; ?>" /></td> <td><input type="text" name="hand4" value="<? echo $hand4; ?>" /></td> </tr> <tr> <td><h2>8</h2></td> <td><input type="text" name="pronun8" value="<? echo $pronun8; ?>" /></td> <td><input type="text" name="read8" value="<? echo $read8; ?>" /></td> <td><input type="text" name="voca8" value="<? echo $voca8; ?>" /></td> <td><input type="text" name="speak8" value="<? echo $speak8; ?>" /></td> <td><input type="text" name="hand18" value="<? echo $hand8; ?>" /></td> </tr> <tr> <td><h2>12</h2></td> <td><input type="text" name="pronun12" value="<? echo $pronun12; ?>" /></td> <td><input type="text" name="read12" value="<? echo $read12; ?>" /></td> <td><input type="text" name="voca12" value="<? echo $voca12; ?>" /></td> <td><input type="text" name="speak12" value="<? echo $speak12; ?>" /></td> <td><input type="text" name="hand12" value="<? echo $hand12; ?>" /></td> </tr> <tr> <td><h2>16</h2></td> <td><input type="text" name="pronun16" value="<? echo $pronun16; ?>" /></td> <td><input type="text" name="read16" value="<? echo $read16; ?>" /></td> <td><input type="text" name="voca16" value="<? echo $voca16; ?>" /></td> <td><input type="text" name="speak16" value="<? echo $speak16; ?>" /></td> <td><input type="text" name="hand16" value="<? echo $hand16; ?>" /></td> </tr> <tr> <td></td> </tr> <tr> </tr> </table> <div id="conteudo_aprov"> <table> <tr> <td><h2>Aprovado para:</h2></td> <td><input type="text" name="aprov" value="<? echo $aprov; ?>" /></td> </tr> <tr> </tr> </table> </div><!-- conteudo_aprov --> <td><input class="input" type="submit" name="enter" value="Atualizar" /></td> </form> <? if(isset($_POST['enter])){ $nome = $_POST['nome']; $matricula = $_POST['matricula']; $nome_da_turma = $_POST['nome_da_turma']; $login = $_POST['login']; $lesson4_3 = $_POST['lesson4_3']; $lesson4_5 = $_POST['lesson4_5']; $pronun4 = $_POST['pronun4']; $pronun8 = $_POST['pronun8']; $pronun12 = $_POST['pronun12']; $pronun16 = $_POST['pronun16']; $read4 = $_POST['read4']; $read8 = $_POST['read8']; $read12 = $_POST['read12']; $read16 = $_POST['read16']; $voca4 = $_POST['voca4']; $voca8 = $_POST['voca8']; $voca12 = $_POST['voca12']; $voca16 = $_POST['voca16']; $speak4 = $_POST['speak4']; $speak8 = $_POST['speak8']; $speak12 = $_POST['speak12']; $speak16 = $_POST['speak16']; $hand4 = $_POST['hand4']; $hand8 = $_POST['hand8']; $hand12 = $_POST['hand12']; $hand16 = $_POST['hand16']; $aprov = $_POST['aprov']; include '../conexao.php'; $update = mysql_query("UPDATE notas SET nome = '$nome', matricula = '$matricula', nome_da_turma = '$nome_da_turma', login = '$login', lesson4_3 = '$lesson4_3', lesson4_5 = '$lesson4_5', pronun4 = '$pronun4', read4 = '$read4', voca4 = '$voca4', speak4 = '$speak4', hand4 = '$hand4', pronun8 = '$pronun8', read8 = '$read8', voca8 = '$voca8', speak8 = '$speak8', hand8 = '$hand8', pronun12 = '$pronun12', read12 = '$read12', voca12 = '$voca12', speak12 = '$speak12', hand12 = '$hand12', pronun16 = '$pronun16', read16 = '$read16', voca16 = '$voca16', speak16 = '$speak16', hand16 = '$hand16', aprov = '$aprov' WHERE matricula = '$matricula'"); if($update == ''){ echo "<script language='javascript'> window.alert('Erro ao alterar dados!'); </script>"; }else{ echo "<script language='javascript'> window.alert('Dados alterados com sucesso!'); </script>"; }}?> </div><!-- conteudo_notas --> </body> </html>