<?php $_SERVER["PHP_SELF"] ?> is the self phpscript Like if my login script is logiform.php the <?php $_SERVER["PHP_SELF"] ?> will be loginform.php
But forget, it work now the action can't be <?php $_SERVER["PHP_SELF"] ?> need be "loginform.php" Idon't know why Thanks On 31 out, 08:20, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > What is <?php $_SERVER["PHP_SELF"] ?> resolving to? Did you do a view > source to see? Is it blank? > > On Oct 31, 2007 6:31 AM, freebox <[EMAIL PROTECTED]> wrote: > > > > > Hello to all! > > > I'm new here, and I have an question =) > > > I cant bind an form when i'm posting to self? > > > I can't get the alert("Thank you for your comment!"); > > > Look This very, very simple script: > > >http://pastemonkey.org/paste/7 > > > Or Here directly: > > > <?php > > require("include/conexao.php"); > > > /* Testa se o form foi enviado */ > > if(isset($_POST['submit'])){ > > > } else { > > ?> > > <html> > > <head> > > <!--PARTE DO AJAX --> > > <script type="text/javascript" > > src="script/jquery.js"></script> > > <script type="text/javascript" src="script/jquery.form.js"></ > > script> > > > <script type="text/javascript"> > > $(document).ready(function() { > > $('#loginform').ajaxForm(function() { > > alert("Thank you for your comment!"); > > }); > > }); > > > </script> > > </head> > > <body> > > <form method="POST" action="<?php $_SERVER["PHP_SELF"] ?>" > > name="loginform" id="loginform" /> > > Usuário<br /> > > <input type="text" /><br /> > > Senha<br /> > > <input type="password" /><br /> > > <input type="submit" value="enviar" name="submit" /> > > </form> > > </body> > > </html> > > > <?php } ?>