How do I send a POST request without output or redirection?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BobTheGreat

    #1

    How do I send a POST request without output or redirection?

    I'm making a lightbox thing for a login so I made a lightbox php script and I dont want to redrect so I have to send a HTTP request using JS.
    Heres my lightbox code:
    Code:
    <?php
    //add lightbox for LOGIN
    $loginlb = beginlightbox();
    ?>
    <b>Login</b>
    <form name="loginform">
    Username:&nbsp;<input type="text" name="username" id="username" /><br />
    Password:&nbsp;<input type="password" name="password" id="password" /><br />
    <input type="button" name="login" id="login" value="login" onclick="login();">
    </form>
    <?php
    endlightbox($loginlb);
    ?>
    PS I made my own lightbox commands
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You'd need to use Ajax. Have you any experience of it?

    Comment

    Working...