Why won't data in Form won't post to PHP page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Spencer Killen
    New Member
    • Jan 2011
    • 10

    #1

    Why won't data in Form won't post to PHP page?

    ok i have two pages and right now i just want to send the form data and display it on another page im using notepad and when i run the codes through and it just comes up as nothing for the varibles

    page 1
    Code:
    <html>
    <?php>
    <form action="php2.php" method="post">
    Username: <input type="text" name="user" />
    Password: <input type="password" name="password" />
    <input type="submit" />
    </form>
    
    </html>
    Code:
    <html>
    Welcome <?php echo $_POST["user"]; ?> <br />
    Your password is: <?php echo $_POST["password"]; ?>
    
    </html>
    i cant get any php to work in notepad (im using google crome)
    Last edited by Niheel; Jan 19 '11, 03:42 AM. Reason: please only post relevant information and edit your question to add relevant information.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    What web server are you using? and what version of PHP did you install on that server?

    Comment

    • edaj
      New Member
      • Jan 2011
      • 2

      #3
      I think that you have open bad one php in line 2 delete "<?php>" and test again

      Greating

      Edson

      Comment

      Working...