Professional Web Applications Themes

Another newbie question - PHP Development

I searched a lot and didnt't yet find an answer why this does not work for me. It drives me already nuts. I've a page I'd like to submit and on the next page I want to access the input from the page before. Even when trying it with different methods I'll don't get it work. It only shows me empty arrays. Help would be very much appreciated. Following is the page (mask_insert.php): <html> <head> <title>Insert Mask</title> </head> <body> <form action="mask_insert.php" method="POST"> <table> <tr> <td>Name:</td> <td><input type="text" name="gname"></td> </tr> <tr> <td>Mail:</td> <td><input type="text" name="gmail"></td> </tr> <tr> <td>Comment:</td> <td><textarea name="gcomment" rows=4 ...

  1. #1

    Default Another newbie question

    I searched a lot and didnt't yet find an answer why this does not work
    for me. It drives me already nuts.

    I've a page I'd like to submit and on the next page I want to access the
    input from the page before. Even when trying it with different methods
    I'll don't get it work. It only shows me empty arrays.

    Help would be very much appreciated.

    Following is the page (mask_insert.php):

    <html>
    <head>
    <title>Insert Mask</title>
    </head>
    <body>
    <form action="mask_insert.php" method="POST">
    <table>
    <tr>
    <td>Name:</td>
    <td><input type="text" name="gname"></td>
    </tr>
    <tr>
    <td>Mail:</td>
    <td><input type="text" name="gmail"></td>
    </tr>
    <tr>
    <td>Comment:</td>
    <td><textarea name="gcomment" rows=4
    cols=50></textarea>
    </tr>
    <tr>
    <td span="2"><input type="submit" value="Submit"></td>
    </tr>
    </table>
    </form>
    Results:<br>
    <?php
    echo "<br>Without doing anything:";
    print_r($_POST);
    print_r($_GET);
    print_r($_REQUEST);
    print_r($HTTP_POST_VARS);
    print_r($HTTP_GET_VARS);
    echo "<br>With making global:";
    global $_POST;
    global $_GET;
    global $_REQUEST;
    global $HTTP_POST_VARS;
    global $HTTP_GET_VARS;
    print_r($_POST);
    print_r($_GET);
    print_r($_REQUEST);
    print_r($HTTP_POST_VARS);
    print_r($HTTP_GET_VARS);
    print_r($GLOBALS['HTTP_POST_VARS']);
    print_r($GLOBALS['HTTP_GET_VARS']);
    echo "<br>With extract:";
    extract($_REQUEST);
    print_r($_POST);
    phpinfo();
    ?>
    </body>
    </html>

    Schnul Guest

  2. #2

    Default Re: Another newbie question

    As additional info: I am running PHP 4.2.3

    Schnul schrieb:
    > I searched a lot and didnt't yet find an answer why this does not work
    > for me. It drives me already nuts.
    >
    > I've a page I'd like to submit and on the next page I want to access the
    > input from the page before. Even when trying it with different methods
    > I'll don't get it work. It only shows me empty arrays.
    >
    > Help would be very much appreciated.
    >
    > Following is the page (mask_insert.php):
    >
    > <html>
    > <head>
    > <title>Insert Mask</title>
    > </head>
    > <body>
    > <form action="mask_insert.php" method="POST">
    > <table>
    > <tr>
    > <td>Name:</td>
    > <td><input type="text" name="gname"></td>
    > </tr>
    > <tr>
    > <td>Mail:</td>
    > <td><input type="text" name="gmail"></td>
    > </tr>
    > <tr>
    > <td>Comment:</td>
    > <td><textarea name="gcomment" rows=4
    > cols=50></textarea>
    > </tr>
    > <tr>
    > <td span="2"><input type="submit" value="Submit"></td>
    > </tr>
    > </table>
    > </form>
    > Results:<br>
    > <?php
    > echo "<br>Without doing anything:";
    > print_r($_POST);
    > print_r($_GET);
    > print_r($_REQUEST);
    > print_r($HTTP_POST_VARS);
    > print_r($HTTP_GET_VARS);
    > echo "<br>With making global:";
    > global $_POST;
    > global $_GET;
    > global $_REQUEST;
    > global $HTTP_POST_VARS;
    > global $HTTP_GET_VARS;
    > print_r($_POST);
    > print_r($_GET);
    > print_r($_REQUEST);
    > print_r($HTTP_POST_VARS);
    > print_r($HTTP_GET_VARS);
    > print_r($GLOBALS['HTTP_POST_VARS']);
    > print_r($GLOBALS['HTTP_GET_VARS']);
    > echo "<br>With extract:";
    > extract($_REQUEST);
    > print_r($_POST);
    > phpinfo();
    > ?>
    > </body>
    > </html>
    >
    Schnul Guest

  3. #3

    Default Re: Another newbie question

    The problem was solved by reinstalling PHP

    Christian Patterer Guest

Similar Threads

  1. Newbie Question: Biz Card Template Question
    By Thomas_Porter@adobeforums.com in forum Adobe Indesign Windows
    Replies: 4
    Last Post: May 30th, 08:08 AM
  2. A newbie with a newbie question
    By dusty_davis@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 5
    Last Post: October 14th, 07:54 AM
  3. LOD newbie question
    By Dr Neil in forum Macromedia Director 3D
    Replies: 3
    Last Post: February 9th, 11:55 PM
  4. Pen Tool Use Question. (Embarrassingly Newbie Question)
    By Bozo Schmozo in forum Macromedia Flash
    Replies: 0
    Last Post: November 12th, 10:00 PM
  5. Newbie OO question
    By Michael Budash in forum PERL Miscellaneous
    Replies: 3
    Last Post: July 17th, 04:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139