Re: [PHP] Why won't my echo won't work? [newbie question]
John Nichel wrote: [EMAIL PROTECTED] wrote: The first two of these 3 echo statements work. But my last echo doesn't. 'username' is the name of the element I want to echo. To the right of each is what I see echoed. echo $_SERVER['REQUEST_METHOD']; echos - POST echo $_POST; echos - Array echo $_POST['username']; echos - nothing How are you setting $_POST['username']? Let's see the code for the form. Members in $_POST array are set (mostly) by submitting a form with POST method, make sure your form is not submitting by GET. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why won't my echo won't work? [newbie question]
FrzzMan wrote: John Nichel wrote: [EMAIL PROTECTED] wrote: The first two of these 3 echo statements work. But my last echo doesn't. 'username' is the name of the element I want to echo. To the right of each is what I see echoed. echo $_SERVER['REQUEST_METHOD']; echos - POST echo $_POST; echos - Array echo $_POST['username']; echos - nothing How are you setting $_POST['username']? Let's see the code for the form. Members in $_POST array are set (mostly) by submitting a form with POST method, make sure your form is not submitting by GET. The first echo statement from the OP shows that the request method is *not* GET. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why won't my echo won't work? [newbie question]
Try using braces around $_POST or any superglobal you use: print_r($_POST); print brbr{$_SERVER['REQUEST_METHOD']}; print brbr{$_POST['username']}; Works for me. Hth, Andre On Sunday 29 August 2004 01:13 pm, John Nichel wrote: FrzzMan wrote: John Nichel wrote: [EMAIL PROTECTED] wrote: The first two of these 3 echo statements work. But my last echo doesn't. 'username' is the name of the element I want to echo. To the right of each is what I see echoed. echo $_SERVER['REQUEST_METHOD']; echos - POST echo $_POST; echos - Array echo $_POST['username']; echos - nothing How are you setting $_POST['username']? Let's see the code for the form. Members in $_POST array are set (mostly) by submitting a form with POST method, make sure your form is not submitting by GET. The first echo statement from the OP shows that the request method is *not* GET. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why won't my echo won't work? [newbie question]
The first two of these 3 echo statements work. But my last echo doesn't. 'username' is the name of the element I want to echo. To the right of each is what I see echoed. echo $_SERVER['REQUEST_METHOD']; echos - POST echo $_POST; echos - Array echo $_POST['username']; echos - nothing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why won't my echo won't work? [newbie question]
[EMAIL PROTECTED] wrote: The first two of these 3 echo statements work. But my last echo doesn't. 'username' is the name of the element I want to echo. To the right of each is what I see echoed. echo $_SERVER['REQUEST_METHOD']; echos - POST echo $_POST; echos - Array echo $_POST['username']; echos - nothing How are you setting $_POST['username']? Let's see the code for the form. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why won't my echo won't work? [newbie question]
John, Thanks for the reply. It is done in software called ToolBook, runs in windows. The toolbook translates to dhtml and then is executed froma browser. The command in toolbook for the data is: Set HTTP POST parameter username to ahttptest I don't expect anyone to know ToolBook, but everything else seems to work as far as getting a post array from the HTTP communications but I'm struggling to render the data from it. I guess I was hoping someone would see something wrong with the way I coded the echo statement. Dennis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why won't my echo won't work? [newbie question]
[EMAIL PROTECTED] wrote: John, Thanks for the reply. It is done in software called ToolBook, runs in windows. The toolbook translates to dhtml and then is executed froma browser. The command in toolbook for the data is: Set HTTP POST parameter username to ahttptest I don't expect anyone to know ToolBook, but everything else seems to work as far as getting a post array from the HTTP communications but I'm struggling to render the data from it. I guess I was hoping someone would see something wrong with the way I coded the echo statement. Dennis Try this on the page receiving the post data... echo ( pre ); print_r ( $_POST ); echo ( /pre ); And you'll see exactly what it's sending thru. Maybe it's sending a numerical array instead of an associative array. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why won't my echo won't work? [newbie question]
Thanks, I'll give it a try. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why won't my echo won't work? [newbie question]
John, Thanks for your help. I got it all to work. In my toolbook set parameter stmt I needed to put quotes around username - username. No where is this documented in ToolBook. Thnaks for your help! Dennis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php