Issue in $_POST

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SanDin
    New Member
    • May 2012
    • 2

    Issue in $_POST

    Hi,
    When executing the first file FORM1.HTM, it displays the form. After the value IS entered in the form, the page directly displays just the plain (full) code of
    "postExample.ph p", instead of executing that php file.

    Please refer the following 2 files.

    1. FORM1.HTM

    Code:
    <form method="POST"
    action="postExample.php">
    <p>Enter name:<input type="text" name="name" size="20" maxLength="20" value><input type="submit" value="Submit" name="B1"></p>
    </form>

    2. postExample.php

    Code:
    <?php
    if (isset($_POST['name']))
    echo 'success';
    else
    echo 'failure';
    ?>


    Note:
    1. We are using phpDesigner 8.
    2. We are using APACHE server and running the files on localhost.
    3. We also changed the register_global s to 'on' in php.ini file.

    Please help us in getting this issue resolved.
    Last edited by Dormilich; May 7 '12, 08:06 AM. Reason: Please use [CODE] [/CODE] tags when posting code.
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    its because something may be wrong with your http.conf. if it is ok then check all the .htaccess files

    Comment

    • SanDin
      New Member
      • May 2012
      • 2

      #3
      Could you please tell me where does these files reside & what could be the possible problem ?
      http.conf and .htaccess files

      Thanks very much,
      -SanDin

      Comment

      • Rockwood
        New Member
        • May 2012
        • 2

        #4
        yes something wrong with ur config

        Comment

        • saravana 786
          New Member
          • Apr 2012
          • 4

          #5
          you can change the name="name" to name="something else"

          Comment

          Working...