Ir para conteúdo
Fórum Script Brasil

acborba

Membros
  • Total de itens

    84
  • Registro em

  • Última visita

Tudo que acborba postou

  1. Cara descobti o erro. Fiz como voce havia me dito e não funcionou porque eu havia esquecido o sinal de igual, depois do name. <tr><input type="hidden" name"id" value="<? echo $reg[idUsuario];?>" vlw pela ajuda
  2. Ai esta quase todo código. Nesta Parte quando dou: <? echo $reg['idUsuario']; ?> ele mostra. Mas quando passo o idUsuario para próxima não vai. <? $senha = $_SESSION[senha]; $usuario = $_SESSION[usuario]; $resultado = mysql_query("SELECT * FROM usuario WHERE senha = $senha and usuario='$usuario'"); $reg= mysql_fetch_assoc($resultado); $num= mysql_num_rows($resultado); if($num!=0) { echo "Olá $usuario !"; if ($reg[tipo]==1) { ?> </p> <form id="cadastro_usuario" method="get" action="cadastro_usuario.php"> <label></label> <table border="0" align="center" id="login"> <tr> <td><input name="cd_usuario" type="submit" id="cd_usuario" value=" Cadastrar Usuário " /></td> </tr> </table> <label> </label> </form> <form id="form4" method="get" action="exibe_usuario.php"> <label></label> <table border="0" align="center" id="login"> <tr> <td><input name="ex_usuarios" type="submit" id="ex_usuarios" value=" Exibir Usuários " /></td> </tr> </table> </form> <form id="form7" method="get" action="exclui_usuario.php"> <label></label> <table border="0" align="center" id="login"> <tr> <td><input name="ec_usuario" type="submit" id="ec_usuario" value=" Excluir Usuário " /></td> </tr> </table> </form> <form id="form10" method="get" action="altera_usuario.php"> <label></label> <table border="0" align="center" id="login"> <tr> <td><input name="alt_aluguel" type="submit" id="alt_usuario" value=" Alterar Usuário " /></td> </tr> </table> </form> <form id="form14" method="get" action="logout.php"> <label></label> <table border="0" align="center" id="login"> <tr> <td><input name="sair2" type="submit" id="sair2" value=" Sair " /></td> </tr> </table> </form> </p> <p> <? } elseif ($reg[tipo]==3){ ?> </p> <form id="form1" name="form1" method="get" action="questionario.php" /> <label></label> <table border="0" align="center" id="login"> <tr><input type="hidden" name"id" value="<? echo $reg[idUsuario];?>" <td><input name="respondeQuestionario" type="submit" id="respondeQuestionario" value="Responder Question&aacute;rio"/></td> </tr><? echo $reg['idUsuario']; ?> </table> </form> <form method="get" name="form7" id="form7" action="logout.php"> <label></label> <table border="0" align="center" id="login"> <tr> <td><input name="sair3" type="submit" id="sair3" value=" Sair " /></td> </tr> </table> </form> </p> <p> <? } elseif ($reg[tipo]==2){ ?> </p> <form id="form1" name="form1" method="get" action="alterar_usuario.php"> <label></label> <table border="0" align="center" id="login"> <tr> <td><input name="cadastraQuestionario" type="submit" id="cadastraQuestionario" value="Cadastrar Questionário" /></td> </tr> </table> </form> <form id="form2" name="form2" method="get" action=""> <label></label> <table border="0" align="center" id="login"> <tr> <td><input name="removeQuestionario" type="submit" id="removeQuestionario" value=" Remover Questionário " /></td> </tr> </table> </form> <form id="form2" name="form2" method="get" action=""> <label></label> <table border="0" align="center" id="login"> <tr> <td><input name="alteraQuestionario" type="submit" id="alteraQuestionario" value=" Alterar Questionário " /></td> </tr> </table> </form> <form id="form2" name="form2" method="get" action="relatorio.php"> <label></label> <table border="0" align="center" id="login"> <tr> <td><input name="relatorioQuestionario" type="submit" id="relatorioQuestionario" value=" Relatório Questionário " /></td> </tr> </table> </form> <form method="get" name="form7" id="form7" action="grafico.php"> <label></label> <table border="0" align="center" id="login"> <tr> <td><label> <input type="submit" name="Submit" value=" Gráficos " /> </label></td> </tr> </table> </form> <p></td> <form id="form3" method="get" action="logout.php"> <table border="0" align="center" id="login"> <tr> <td><input name="sair" type="submit" id="sair" value=" Sair " /></td> </tr> </table> </form> <p> <? } } else{ echo "Usuário não cadastrado!"; ?> <p> <? echo "Para ter acesso entre em contato com o administrador"; } mysql_close($conexao); ?> </div> </body> </html>
  3. Cara exite um local especifico para eu colocar esse codigo porque não esta funcionando. Dou um: e não aparece nada. Desta forma eu dou um echo na primeira pagina e ele mostra mas não passa para a próxima. <input type="hidden" name="id" value="<? echo $reg[idUsuario]; <? echo $reg['idUsuario'];?>
  4. alguém pode me dar uma luz??? :D
  5. Poisé, eu achei um exemplo desta forma, só adaptei para "puxar" os dados do banco. É esse o erro que acontece.
  6. Cara o resultado do print_r($data) é esse: a principio não vejo erro. Já em relação ao $data[]=mysql_fetch_array($atendimento); fiz e deu erro. Vlw
  7. Pessoal estou tentando gerar o seguinte grafico com o PHPLot: Grafico Este é o código que estou tentando fazer: <? include "conexao.inc"; session_start(); $user=$_SESSION[user]; include ('C:\xampp\PHPlot\PHPlot.php'); $atendimento=mysql_query ("SELECT AVG(atendInformacao = 0) * 100, AVG(atendAtendimento = 0) * 100, AVG(atendTempoEspera = 0) * 100, AVG(atendInformacao = 1) * 100, AVG(atendAtendimento = 1) * 100, AVG(atendTempoEspera = 1) * 100, AVG(atendInformacao = 2) * 100, AVG(atendAtendimento = 2) * 100, AVG(atendTempoEspera = 2) * 100, AVG(atendInformacao = 3) * 100, AVG(atendAtendimento = 3) * 100, AVG(atendTempoEspera = 3) * 100, AVG(atendInformacao = 4) * 100, AVG(atendAtendimento = 4) * 100, AVG(atendTempoEspera = 4) * 100, AVG(atendInformacao = 5) * 100, AVG(atendAtendimento = 5) * 100, AVG(atendTempoEspera = 5) * 100 FROM questionario WHERE atendInformacao OR atendAtendimento OR atendTempoEspera IN (0,1,2,3,4,5)" ); $n_rows = mysql_num_rows($atendimento); $data[]=mysql_fetch_array($atendimento); //cria novo objeto com o tamnho da imagem $graph = new PHPlot(800,600); $graph->SetPlotType('bars'); $graph->SetTitle("Avalialção Atendimento ADS 2009/1"); $graph->SetXTitle('Nivel de Satisfacao'); $graph->SetYTitle('%'); $graph->SetXTickLabelPos('none'); $graph->SetXTickPos('plotdown'); $graph->SetPlotAreaWorld("",0,"",100); $graph->SetFileFormat('jpg'); $graph->SetDataValues($data); $graph->SetBackGroundColor("grey"); $graph->SetLegend('atendInformacao'); $graph->SetLegend('atendAtendimento'); $graph->SetLegend('atendTempoEspera'); $graph->SetNumXTicks(5); $graph->DrawGraph(); ?> Mas esta saindo desta forma, tudo junto e duplicado. alguém pode me dar uma ajuda? PS: Postei no local errado algum admin pode mover para o local certo?
  8. Gostaria de gerar gráficos dinamicamente apartir de um banco de dados MySql e usando o PHPLot. Estou conseguindo gerar os gráficos mas esta aparecendo sem nenhum valo. Segue o codigo abaixo:
×
×
  • Criar Novo...