• Hi all

    I am trying to create a sumbit and report page (all in one). But the php gets executed at the same time that the html does. On a regular Php page the script “<?php if (count($_POST)>0) echo “Form Submitted!”; ?>” is executed after I click submit, on WprdPress its executed when the page is loaded…clearly i dont want that, as the php which is supposed to follow is supposed to do much more than a simple echo. Can one of you fine folks please help with this issue ?

    I tried this both in a page and a page template, same result…please help.

    <html>
      <head>
        <title>Notify on Submit</title>
      </head>
      <body>
        <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
          <label>Name: <input type="text" name="name" /></label>
          <input type="submit" value="Submit" />
        </form>
        <?php if (count($_POST)>0) echo "Form Submitted!"; ?>
      </body>
    </html>

    Sorry for my bad english…I am from germany 🙂

The topic ‘Notify on Submit’ is closed to new replies.