fabricioje
Membros-
Total de itens
2 -
Registro em
-
Última visita
Sobre fabricioje
fabricioje's Achievements
0
Reputação
-
Boa noite. Eu estou iniciando em PHP e tenho que criar uma API Restful em PHP. Alguém pode me ajudar ou indicar onde eu possa achar algo ensinando como se faz? Obrigado.
-
Pessoal, eu estou com uma dificuldade nesse script, as informações que eu coloco ele não estão sendo salvas no db, e também não esta mostrando nem um erro. Alguém pode me ajudar? index.html <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <form name="form1" id="form1" method="post" action="validacao.php" /> <table width="387" border="0"> <tr> <td width="163" align="right"><blockquote>usuario</blockquote></td> <td width="208"><input type="text" name="usuario" id="usuario" /></td> </tr> <tr> <td align="right"><blockquote>senha</blockquote></td> <td><input type="text" name="senha" id="senha" /></td> </tr> <tr> <td></td> <td><input type="submit" name="cadastrar" id="cadastrar" value="Cadastrar"> </td> </tr> </table> </body> </html> conexao.php <?php $con = mysql_connect("localhost","root",""); $bd = mysql_select_db("olimpiadas",$con); ?> funcao_gravar.php <?php include "conexao.php"; $nome_equipe = $_POST['nome_equipe']; $sql = mysql_query("INSERT INTO cadastro (nome_equipe) value('$nome_equipe')" or die (mysql_error()); header ("Location: olimpiadas.php"); ?> validacao.php <?php $usuario = $_POST['usuario']; $login = $_POST['senha']; if ($usuario == admin and $login == 123){ header ("Location: olimpiadas.html");} if ($usuario <> admin and $login <> 123){ header ("Location: errado.php");} ?> olimpiadas.html <html> <body> <form name="equipe" id="equipe" method="post" action="olimpiadas.html"> <table width="300" height="0"border="0" align="center"> <tr> <td>Digite o nome da sua equipe: <input type="text" name="nome_equipe" id="nome_equipe"></td> <td><input type="submit" name="botao" id="botao" value="Cadastrar"></td> </tr> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> </body> </html>