Suggestion,

Stick the following line of code in a spot in the php code that gets control
from the form submit and see what is actually being passed from the form;

foreach($_POST as $k => $v) echo "POST[".$k."] = [".$v."]<br>";

see if this shows you what you are looking for.

NOTE: if you are not using the form "POST" method, change all instances of
"POST" to "GET" in the statement.

good luck,

Warren Vail


-----Original Message-----
From: Philip Olson [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 12, 2004 1:55 PM
To: Dan Aloma
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] [Q]PHP not taking input values from forms



> > > that tag is working fine and shows me the info. For some reason php
will
> > > take input values only from the URL, not from the html code. any
ideas?
> >
> >A few questions:
> >
> >   a) What's the exact version of PHP?
> >   b) Please post the smallest possible form that creates this
> >      problem.
> >   c) And how are you attempting to access these form values?
> >
> >If you're interested in some working examples and related
> >information, have a look at the following manual page:
> >
> >   http://www.php.net/variables.external
>
> Thanks for the suggestions, first of all. I tried that exact code from the

> code you included and I cut and pasted the "Simple HTML Form", and below 
> that I pasted the "Accessing Data..." php code. When I go to the page, all

> it does after I hit the submit button with data in the fields, is say "no 
> input file specified". But when I run it through the url giving the input 
> names with values, it returns them. I tried getting it working with like
ten 
> people so far, and no one's been able to figure out... I am running PHP 
> 4.3.4, btw.
>

Be sure you rename the "action" part of the "simple html form" 
to whatever page you are using, instead of foo.php, as otherwise 
it will literally attempt to access foo.php  I'm guessing this 
is what's happening by seeing "no input file specified".

Either fix that or on that same manual page is the example 
titled "More complex form variables", this prints to itself
as it demonstrates a use of the popular $_SERVER['PHP_SELF'] 
variable.

Also, it's important you realize the difference between POST
and GET, and how to access them, so you may want to read that
manual page too. (hint: GET is through the URL's QUERY_STRING
(the stuff after the ?) while POST is not).

Regards,
Philip

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

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

Reply via email to