xplode_me Posted May 15, 2008 at 05:46 PM Report Share #185326 Posted May 15, 2008 at 05:46 PM Olá! Em http://www.planetuga.com/conta tenho 2 campos para enviar dados por POST para um login.php. A questão é que os $_POST (qualquer um) chega sempre vazio ao login.php. Alguém já passou por algo semelhante? O mesmo código noutros 2 servidores funciona 5*. Abraço! Link to comment Share on other sites More sharing options...
psiico Posted May 15, 2008 at 08:35 PM Report Share #185365 Posted May 15, 2008 at 08:35 PM posta o codigo, era mais facil. mas pode ser de o server nao suportar short_tags ou assim 1 cena parecida em vez de usares: "<?" teres q usar "<?php". Eu nao sei tou a falar de cor. Coloca o código para ver Psiico // Portfolio Link to comment Share on other sites More sharing options...
pedrotuga Posted May 15, 2008 at 08:38 PM Report Share #185368 Posted May 15, 2008 at 08:38 PM para debugging: echo "<pre>"; print_r($_POST); echo "</pre>"; Link to comment Share on other sites More sharing options...
psiico Posted May 15, 2008 at 08:48 PM Report Share #185375 Posted May 15, 2008 at 08:48 PM nao tem q identificar o passa por post? tipo: $_POST['username'] ? Psiico // Portfolio Link to comment Share on other sites More sharing options...
pedrotuga Posted May 15, 2008 at 11:23 PM Report Share #185413 Posted May 15, 2008 at 11:23 PM nao tem q identificar o passa por post? tipo: $_POST['username'] ? Não. Link to comment Share on other sites More sharing options...
neverdie Posted May 16, 2008 at 10:51 AM Report Share #185449 Posted May 16, 2008 at 10:51 AM Assim a que é: <form action="login.php" name="login" method="post"> Login: <INPUT type="text" name = "login"> <br> Password: <INPUT type="password" name="password"> </form> login.php: <? $login = $_POST['login']; $password = $_POST['password']; echo $login; echo $password; ?> boa sorte! Link to comment Share on other sites More sharing options...
psiico Posted May 16, 2008 at 11:44 PM Report Share #185569 Posted May 16, 2008 at 11:44 PM (ha' a opção para editar posts. evita o double posting. 😄 ) Psiico // Portfolio Link to comment Share on other sites More sharing options...
xplode_me Posted May 20, 2008 at 09:54 PM Author Report Share #186365 Posted May 20, 2008 at 09:54 PM Hm, depois de alterar o código de modo a que os formulários não fossem o resultado de echo's php, tudo funciona bem. Estranho?? tive de passar de echo "<form etc etc"; para código html sem nada de echos. Funciona 100%. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now