Re: [PHP] Novice: Problems getting data from forms toPHPscripts.

2002-02-14 Thread Sean Connelly

Thanks Jeff and sincere apologies for such a simple typoI had copied
the html from some on-line example but had tweaked name to dateit's
been a while since I've done HTML and I was concentrating on the php
side of things.

Thanks

Sean.

>>> Jeff Sheltren <[EMAIL PROTECTED]> 14/02/02 15:58:01 >>>
Hi, for starters, I think you need to change your html... it should read

something like this:

Name: 

Jeff

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

>Hi,
>
>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
>
>html>FORM
>
>
>
> Name: 
> 
>
>
>
>
>
>
>File: test.php
>
>"; 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!"; ?>
>**
>Output:-
>
>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
>name.
>
>Many thanks for your help.
>
>Sean.



[PHP] Novice: Problems getting data from forms to PHP scripts.

2002-02-14 Thread Sean Connelly


Hi,

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

html>FORM



Name: 





  

File: test.php

PHP Test


";

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!";

?>



**
Output:-

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
name.

Many thanks for your help.

Sean.