RE: [PHP] [Q]PHP not taking input values from forms
| From: | Dan Aloma | Date: | Sat, 14 Feb 2004 17:19:26 +0000 |
| Subject: | RE: [PHP] [Q]PHP not taking input values from forms | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-177708@lists.php.net to get a copy of this message | ||
yeah. phpinfo() works, which is how I know for sure that PHP is working fine. It's just not taking inputs. WTF is going? hehe....I'm going nuts over here. Any other ideas?
From: "Vail, Warren" <Warren.Vail@schwab.com> To: "'Dan Aloma'" <digistuff1@hotmail.com> CC: php-general@lists.php.net Subject: RE: [PHP] [Q]PHP not taking input values from forms Date: Fri, 13 Feb 2004 14:40:48 -0700 I'd try to insert a simple echo statement, and figure out why it's not returning anything. try a file named phpinfo.php ----------------snip-------------- <?php phpinfo(); ?> ----------------snip--------------- if your web server implementation is correct that should work. good luck, Warren Vail -----Original Message----- From: Dan Aloma [mailto:digistuff1@hotmail.com] Sent: Friday, February 13, 2004 12:38 PM To: Vail, Warren Cc: php-general@lists.php.net Subject: RE: [PHP] [Q]PHP not taking input values from forms when i run that, it doesn't show return anything. I really don't understand what's going on with php. I know it's working fine, it's just not returning anything. Even scripts that I KNOW for a fact should be working (i.e. they work for everyone else), don't work for me. Any other ideas? I REALLY need to get this running, and it's upsetting because I don't get what's going on. TIA. From: "Vail, Warren" <Warren.Vail@schwab.com>_________________________________________________________________ Click here for a FREE online computer virus scan from McAfee. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963To: "'Philip Olson'" <philip@cornado.com>, Dan Aloma<digistuff1@hotmail.com> CC: accerqueira@superig.com.br, php-general@lists.php.net Subject: RE: [PHP] [Q]PHP not taking input values from forms Date: Thu, 12 Feb 2004 14:03:05 -0800 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:philip@cornado.com] Sent: Thursday, February 12, 2004 1:55 PM To: Dan Aloma Cc: accerqueira@superig.com.br; php-general@lists.php.net Subject: Re: [PHP] [Q]PHP not taking input values from formsphp willthat tag is working fine and shows me the info. For some reasonideas?take input values only from the URL, not from the html code. anytheA few questions: a) What's the exact version of PHP? b) Please post the smallest possible form that creates thisThanks for the suggestions, first of all. I tried that exact code fromproblem.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.externalcode you included and I cut and pasted the "Simple HTML Form", andbelowthat I pasted the "Accessing Data..." php code. When I go to the page,allit does after I hit the submit button with data in the fields, is say"noinput file specified". But when I run it through the url giving theinputnames with values, it returns them. I tried getting it working withlike tenpeople so far, and no one's been able to figure out... I am runningPHP4.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 _________________________________________________________________ Keep up with high-tech trends here at "Hook'd on Technology." http://special.msn.com/msnbc/hookedontech.armx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php