Hi, for starters, I think you need to change your html... it should read 
something like this:

Name: <input type="text" name="dateid"><br>


At 03:50 PM 2/14/2002 +0000, Sean Connelly wrote:

>I've just started to learn php. I can't seem to get any data from an
>HTML form to a php script. I've had a look at the manual and the various
>on-line documentation and I think I'm doing things right but perhaps
>someone can advice on the following :-
>File: form.php
><form method="post" action="test.php" >
>     Name: <input type="text" date="dateid"><br>
>     <input type="submit">
>File: test.php
><?php echo "Hello World!
>"; foreach ($HTTP_POST_VARS as $var => $value) { echo "$var = $value
>\n"; } foreach ($HTTP_GET_VARS as $var => $value) { echo "$var = $value
>\n"; } var_dump($HTTP_POST_VARS); echo "$dateid
>"; echo "Hello World!"; ?>
>Hello World!
>array(0) { }
>Warning: Undefined variable: dateid in d:\Data\Web\test.php on line 19
>Hello World!
>Now I expect the warning for undefined dateid variable as this won't
>work with register_globals enviornment variable set to off. But
>according to the documentation the HTTP_POST_VARS should work. By the
>way, I've tried using the GET method as well.
>I'm running php 4.1.1, Apache 1.3.23 on NT4 SP6 using IE5.5 and Opera
>6.0 Thinking it was my setup (which took a while to get working) I
>uploaded the scripts to my ISP web server and got the same results!
>(Linux, Apache 1.3.14, php 4.0.3pl1)
>Any ideas as to what's happening ?
>Also I'd like to display some times that are also hyperlinks such that
>when clicked upon they call a php function passing in the time as
>data/parameter. Can someone give me hints on the best way to do this. Do
>these functions have to exist in a separate file, or can they reside in
>the same file as the form/hyperlink data and just reference the function
>Many thanks for your help.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to