Passing Data with Form Method post Problem

Discussion in 'PHP' started by rezax123, Oct 22, 2011.

  1. #1
    Text Html Code:
    <HTML>
    <HEAD></HEAD>
    <BODY>
    <FORM METHOD=POST ACTION="text.php">
    Who is your favourite author?
    <INPUT NAME"Author" TYPE="TEXT">
    <BR>
    <BR>
    <INPUT TYPE=SUBMIT>
    </FORM>
    </BODY>
    </HTML>
    Code (markup):
    Text Php Code:
    <HTML>
    <HEAD></HEAD>
    <BODY>
    Your favorite Author is:
    <?php
    echo $Author;
    ?>
    </BODY>
    </HTML>
    
    Code (markup):
    i checked it in my IIS server at my pc. and in the webserver too.

    Here is the result:
    what is the prob? $Author variable didn't get data from Author?
     
    rezax123, Oct 22, 2011 IP
  2. rezax123

    rezax123 Member

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #2
    here is thing i made the misake:
    but after changing it to:
    no difference.
     
    rezax123, Oct 22, 2011 IP
  3. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #3
    Based on the two codes you have show us above it should be:
    
    <HTML>
    <HEAD></HEAD>
    <BODY>
    Your favorite Author is:
    <?php
    echo $_POST['$Author'];
    ?>
    </BODY>
    </HTML>
    
    Code (markup):
    Or if you have change that to method=get than its echo $_GET['$Author'];
     
    MyVodaFone, Oct 23, 2011 IP
  4. rezax123

    rezax123 Member

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #4
    i solved the prob. the prob wasn't in the code. it was in the php version. i was reading a php4 book and using php5. most of the people use php5 now. so i start reading php5 book. now prob solved.
     
    rezax123, Oct 23, 2011 IP