how to submit a form using php?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • psycho802
    New Member
    • Nov 2007
    • 1

    how to submit a form using php?

    hi guys! i'm newbie of this forum, can i ask for some help about submitting a form using php...

    tnx!
  • ak1dnar
    Recognized Expert Top Contributor
    • Jan 2007
    • 1584

    #2
    This thread is located on our php-Articles Section. Please read. Thanks.

    Welcome to TheScripts

    Comment

    • underscore
      New Member
      • Jul 2007
      • 30

      #3
      try this code
      [CODE=php] <?php

      if isset($_POST['Name of your Submit button'] {
      statements;
      }else{
      statements;
      }[/CODE]
      Last edited by ak1dnar; Nov 20 '07, 09:19 AM. Reason: Added [Code=Php] Tags

      Comment

      • aayybb
        New Member
        • Sep 2007
        • 7

        #4
        Originally posted by ajaxrand
        This thread is located on our php-Articles Section. Please read. Thanks.

        Welcome to TheScripts
        Hi Atli or any PHP expert,

        Can you tell me what the following action code does?
        I got it from the post you have. I copied your example and saved it as test.html. I ran it and then it went nowhere after I pressed Login. Sorry I don't know anything about PHP. But I do need to set up password for a website and if the password matches then the user can proceed to another html. Can you help me?

        action="<?php echo $_SERVER['PHP_SELF']; ?>"

        Comment

        • nathj
          Recognized Expert Contributor
          • May 2007
          • 937

          #5
          Originally posted by aayybb
          Hi Atli or any PHP expert,

          Can you tell me what the following action code does?
          I got it from the post you have. I copied your example and saved it as test.html. I ran it and then it went nowhere after I pressed Login. Sorry I don't know anything about PHP. But I do need to set up password for a website and if the password matches then the user can proceed to another html. Can you help me?

          action="<?php echo $_SERVER['PHP_SELF']; ?>"
          Hi aayybb,

          Have a read through this article This should explain what it's doing.

          In short the line you have there looks like it came from part of a form tag. If so it is setting the action of the form - the forms target destination, to be the page the form is on. It's a way of making a form submit to the same page.

          I hope this helps.
          nathj

          Comment

          Working...