Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2010
    Posts
    12
    Thanks
    4
    Thanked 0 Times in 0 Posts

    php post not working

    i need some help as the post method is not working for me

    html code
    Code:
    <form method="post" action="" >
    Username: <input type="text" name="username" />
    Password: <input type="password" name="user_pass" />
    Password again: <input type="password" name="user_pass_check" />
    <input type="submit" value="sign up" />
    </form>
    thanks in advance

  • #2
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    You need an ISSET statement when posting a form. Also give your submit button a NAME tag.

    PHP Code:
    if (isset($_POST['submit']))
    {
    echo 
    'Form submitted successfully';
    }
    else {
    <
    form method="post" action="">
    Username: <input type="text" name="username" />
    Password: <input type="password" name="user_pass" />
    Password again: <input type="password" name="user_pass_check" />
    <
    input type="submit" name="submit" value="sign up" />
    </
    form>

    Rowsdower! has accused me of having mental problems, and the administrator allowed it. What a great forum huh?

  • Users who have thanked masterofollies for this post:

    stevey17 (03-20-2010)


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •