Re: Forms
| From: | Jason Wong | Date: | Mon, 29 Apr 2002 18:23:06 +0000 |
| Subject: | Re: Forms | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95216@lists.php.net to get a copy of this message | ||
On Tuesday 30 April 2002 01:25, Arpan De wrote:
> But I don't know why I am not getting the output. I am just getting the
> following error:
>
> Notice: Undefined variable: fame in d:\inetpub\wwwroot\php\Form1.php on
> line 3
>
> In order to pass the Form values to a PHP page, I went through 3-4
> tutorials on the web & all showed this way only to collect the form values
> as what I have done but still I am getting the error. It's damn frustrating
> when even after just copying & pasting the code from the tutorial & then
> running it I get an error. I even tried the above using print($fname) but
> without any luck. But if I include the following line in the PHP code
> before the above PHP line
You're probably using a newer of php (4.1.X) in which the default behaviour
of many aspects of php had changed.
So if you're using php 4.1.X then you need to reference $fname as:
$_POST['fname']
Or if you had use the GET method in your form then:
$_GET['fname']
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Just because the message may never be received does not mean it is
not worth sending.
*/