Re: [PHP] [NEWBIE] Cant get $_POST to work
John Nichel wrote: The Disguised Jedi wrote: i think you have to use the ID parameter in the input tag in your HTML Name: input type=text name=name value=your name id=name /br/ Age: input type=text name=age value=your age id=age /br/ try that and see how it goes If I'm not mistaken, ID in a form element will assign it a 'style', much the same way as 'class' does. It's been a while since I've done any HTML/CSS, so I could be wrong. the ID of a DOM element is exactly that - the id of the element in the document (object model). only the NAME attribute is used when POSTing form elements... so that come down to ID only being used on the clientside (as fas as this example is concerned - obviously serverside XML processors may make use of ID attributes for their own reasons) indeed both ID and CLASS attributes can be used to assign style instructions to a DOM element. (bare in mind that assign styles, even in very specific/advanced ways usually doesn't require referencing either attribute - the CSS pros/samurai are recommending using ID amd CLASS to assign style only as a last resort) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [NEWBIE] Cant get $_POST to work
I have this simple form file: html head /head body form action=test.php method=post Name: input type=text name=name value=your name /br/ Age: input type=text name=age value=your age /br/ input type=submit name=submit value=submit / /form /body /html Which passes (I wish!) data to this script: ?php $name = $_POST['name'] ; $age = $_POST['age'] ; print(Hello, $name! You are $age years old!); ? It does not work unless I turn register_globals ON in the php.ini file. The php documentation leads me to believe this script SHOULD work with register_globals OFF. This a NEW instasllation of the Windows IIS Server also. Is there perhaps some configuration on the WINDOWS SERVER that must be set for general global data to be passed from a 'form' type page? David F. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [NEWBIE] Cant get $_POST to work
David Freedman wrote: I have this simple form file: html head /head body form action=test.php method=post Name: input type=text name=name value=your name /br/ Age: input type=text name=age value=your age /br/ input type=submit name=submit value=submit / /form /body /html Which passes (I wish!) data to this script: ?php $name = $_POST['name'] ; $age = $_POST['age'] ; print(Hello, $name! You are $age years old!); ? What's the output if you put this on test.php... pre ?php print_r ( $_POST ); ? /pre -- 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] [NEWBIE] Cant get $_POST to work
What's up David... This script *should* work... I don't see any errors, but try this anyways. In your change your print command to this: print(Hello, . $name . ! You are . $age . years old!); What those periods do is simply append them to each other, so in this case, you have the string, then you're appending the variable, then appending another string, then another variable, then the last string. Instead of having it all bunched up. David Freedman wrote: I have this simple form file: html head /head body form action=test.php method=post Name: input type=text name=name value=your name /br/ Age: input type=text name=age value=your age /br/ input type=submit name=submit value=submit / /form /body /html Which passes (I wish!) data to this script: ?php $name = $_POST['name'] ; $age = $_POST['age'] ; print(Hello, $name! You are $age years old!); ? It does not work unless I turn register_globals ON in the php.ini file. The php documentation leads me to believe this script SHOULD work with register_globals OFF. This a NEW instasllation of the Windows IIS Server also. Is there perhaps some configuration on the WINDOWS SERVER that must be set for general global data to be passed from a 'form' type page? David F. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] [NEWBIE] Cant get $_POST to work
Thanks for the input. However it does no good if the variables are empty, which is my problem. The darn $_POST thing does not work at all for me, and I am trying to find out why. -Original Message- From: b1nary Developement Team [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 3:40 PM To: David Freedman; php Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work What's up David... This script *should* work... I don't see any errors, but try this anyways. In your change your print command to this: print(Hello, . $name . ! You are . $age . years old!); What those periods do is simply append them to each other, so in this case, you have the string, then you're appending the variable, then appending another string, then another variable, then the last string. Instead of having it all bunched up. David Freedman wrote: I have this simple form file: html head /head body form action=test.php method=post Name: input type=text name=name value=your name /br/ Age: input type=text name=age value=your age /br/ input type=submit name=submit value=submit / /form /body /html Which passes (I wish!) data to this script: ?php $name = $_POST['name'] ; $age = $_POST['age'] ; print(Hello, $name! You are $age years old!); ? It does not work unless I turn register_globals ON in the php.ini file. The php documentation leads me to believe this script SHOULD work with register_globals OFF. This a NEW instasllation of the Windows IIS Server also. Is there perhaps some configuration on the WINDOWS SERVER that must be set for general global data to be passed from a 'form' type page? David F. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [NEWBIE] Cant get $_POST to work
Well this form *is* sending the data because there are no errors in your code... Their has to be some minor little mistake somewhere that we can't see in the code you gave us... look for typos, make sure the php code *is* on test.php. Also, when getting the variables from the post, try using $_REQUEST instead of $_POST, it may work. Try switching the method on the form page to get and see of they show up in the URL. You just gotta do some testing and rule out errors until you can pinpoint it. eatc7402 wrote: Thanks for the input. However it does no good if the variables are empty, which is my problem. The darn $_POST thing does not work at all for me, and I am trying to find out why. -Original Message- From: b1nary Developement Team [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 3:40 PM To: David Freedman; php Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work What's up David... This script *should* work... I don't see any errors, but try this anyways. In your change your print command to this: print(Hello, . $name . ! You are . $age . years old!); What those periods do is simply append them to each other, so in this case, you have the string, then you're appending the variable, then appending another string, then another variable, then the last string. Instead of having it all bunched up. David Freedman wrote: I have this simple form file: html head /head body form action=test.php method=post Name: input type=text name=name value=your name /br/ Age: input type=text name=age value=your age /br/ input type=submit name=submit value=submit / /form /body /html Which passes (I wish!) data to this script: ?php $name = $_POST['name'] ; $age = $_POST['age'] ; print(Hello, $name! You are $age years old!); ? It does not work unless I turn register_globals ON in the php.ini file. The php documentation leads me to believe this script SHOULD work with register_globals OFF. This a NEW instasllation of the Windows IIS Server also. Is there perhaps some configuration on the WINDOWS SERVER that must be set for general global data to be passed from a 'form' type page? David F.
Re: [PHP] [NEWBIE] Cant get $_POST to work
On Sunday 20 February 2005 05:07 pm, b1nary Developement Team wrote: Well this form *is* sending the data because there are no errors in your code... Their has to be some minor little mistake somewhere that we can't see in the code you gave us... look for typos, make sure the php code *is* on test.php. Also, when getting the variables from the post, try using $_REQUEST instead of $_POST, it may work. Try switching the method on the form page to get and see of they show up in the URL. You just gotta do some testing and rule out errors until you can pinpoint it. eatc7402 wrote: Thanks for the input. However it does no good if the variables are empty, which is my problem. The darn $_POST thing does not work at all for me, and I am trying to find out why. -Original Message- From: b1nary Developement Team [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 3:40 PM To: David Freedman; php Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work What's up David... This script *should* work... I don't see any errors, but try this anyways. In your change your print command to this: print(Hello, . $name . ! You are . $age . years old!); What those periods do is simply append them to each other, so in this case, you have the string, then you're appending the variable, then appending another string, then another variable, then the last string. Instead of having it all bunched up. David Freedman wrote: I have this simple form file: html head /head body form action=test.php method=post Name: input type=text name=name value=your name /br/ Age: input type=text name=age value=your age /br/ input type=submit name=submit value=submit / /form /body /html Which passes (I wish!) data to this script: ?php $name = $_POST['name'] ; $age = $_POST['age'] ; print(Hello, $name! You are $age years old!); ? It does not work unless I turn register_globals ON in the php.ini file. The php documentation leads me to believe this script SHOULD work with register_globals OFF. This a NEW instasllation of the Windows IIS Server also. Is there perhaps some configuration on the WINDOWS SERVER that must be set for general global data to be passed from a 'form' type page? David F. Hi David, I had the same problem before -- do you have a /form tag in there? Just an idea, Andre -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [NEWBIE] Cant get $_POST to work
dbfreedman wrote: I am so new I don't know what you mean by 'test.php David Please reply to the list...better chance of finding the answer to your problem that way. You have the action of your form set to 'test.php', i.e. you should have a file in the same directory as your form called test.php. In that file, put this... pre ?php print_r ( $_POST ); ? /pre If you get the values that you submitted (with globals off, like it _should_ work), then all is fine. You can also change $_POST to $_REQUEST if you wish, just to see all the data being passed to your script. -- 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] [NEWBIE] Cant get $_POST to work
try $HTTP_POST_VARS maybe it is an older version of PHP Randy eatc7402 wrote: Thanks for the input. However it does no good if the variables are empty, which is my problem. The darn $_POST thing does not work at all for me, and I am trying to find out why. -Original Message- From: b1nary Developement Team [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 3:40 PM To: David Freedman; php Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work What's up David... This script *should* work... I don't see any errors, but try this anyways. In your change your print command to this: print(Hello, . $name . ! You are . $age . years old!); What those periods do is simply append them to each other, so in this case, you have the string, then you're appending the variable, then appending another string, then another variable, then the last string. Instead of having it all bunched up. David Freedman wrote: I have this simple form file: html head /head body form action=test.php method=post Name: input type=text name=name value=your name /br/ Age: input type=text name=age value=your age /br/ input type=submit name=submit value=submit / /form /body /html Which passes (I wish!) data to this script: ?php $name = $_POST['name'] ; $age = $_POST['age'] ; print(Hello, $name! You are $age years old!); ? It does not work unless I turn register_globals ON in the php.ini file. The php documentation leads me to believe this script SHOULD work with register_globals OFF. This a NEW instasllation of the Windows IIS Server also. Is there perhaps some configuration on the WINDOWS SERVER that must be set for general global data to be passed from a 'form' type page? David F. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [NEWBIE] Cant get $_POST to work
i think you have to use the ID parameter in the input tag in your HTML Name: input type=text name=name value=your name id=name /br/ Age: input type=text name=age value=your age id=age /br/ try that and see how it goes On Sun, 20 Feb 2005 17:52:26 -0500, Randy Johnson [EMAIL PROTECTED] wrote: try $HTTP_POST_VARS maybe it is an older version of PHP Randy eatc7402 wrote: Thanks for the input. However it does no good if the variables are empty, which is my problem. The darn $_POST thing does not work at all for me, and I am trying to find out why. -Original Message- From: b1nary Developement Team [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 3:40 PM To: David Freedman; php Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work What's up David... This script *should* work... I don't see any errors, but try this anyways. In your change your print command to this: print(Hello, . $name . ! You are . $age . years old!); What those periods do is simply append them to each other, so in this case, you have the string, then you're appending the variable, then appending another string, then another variable, then the last string. Instead of having it all bunched up. David Freedman wrote: I have this simple form file: html head /head body form action=test.php method=post Name: input type=text name=name value=your name /br/ Age: input type=text name=age value=your age /br/ input type=submit name=submit value=submit / /form /body /html Which passes (I wish!) data to this script: ?php $name = $_POST['name'] ; $age = $_POST['age'] ; print(Hello, $name! You are $age years old!); ? It does not work unless I turn register_globals ON in the php.ini file. The php documentation leads me to believe this script SHOULD work with register_globals OFF. This a NEW instasllation of the Windows IIS Server also. Is there perhaps some configuration on the WINDOWS SERVER that must be set for general global data to be passed from a 'form' type page? David F. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- The Disguised Jedi [EMAIL PROTECTED] Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm already internationally compatible! PHP rocks! Knowledge is Power. Power Corrupts. Go to school, become evil Disclaimer: Any disclaimer attached to this message may be ignored. However, I must say that the ENTIRE contents of this message are subject to other's criticism, corrections, and speculations. This message is Certified Virus Free -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [NEWBIE] Cant get $_POST to work
Why do you need the ID? I never use that in my forms. Randy The Disguised Jedi wrote: i think you have to use the ID parameter in the input tag in your HTML Name: input type=text name=name value=your name id=name /br/ Age: input type=text name=age value=your age id=age /br/ try that and see how it goes On Sun, 20 Feb 2005 17:52:26 -0500, Randy Johnson [EMAIL PROTECTED] wrote: try $HTTP_POST_VARS maybe it is an older version of PHP Randy eatc7402 wrote: Thanks for the input. However it does no good if the variables are empty, which is my problem. The darn $_POST thing does not work at all for me, and I am trying to find out why. -Original Message- From: b1nary Developement Team [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 3:40 PM To: David Freedman; php Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work What's up David... This script *should* work... I don't see any errors, but try this anyways. In your change your print command to this: print(Hello, . $name . ! You are . $age . years old!); What those periods do is simply append them to each other, so in this case, you have the string, then you're appending the variable, then appending another string, then another variable, then the last string. Instead of having it all bunched up. David Freedman wrote: I have this simple form file: html head /head body form action=test.php method=post Name: input type=text name=name value=your name /br/ Age: input type=text name=age value=your age /br/ input type=submit name=submit value=submit / /form /body /html Which passes (I wish!) data to this script: ?php $name = $_POST['name'] ; $age = $_POST['age'] ; print(Hello, $name! You are $age years old!); ? It does not work unless I turn register_globals ON in the php.ini file. The php documentation leads me to believe this script SHOULD work with register_globals OFF. This a NEW instasllation of the Windows IIS Server also. Is there perhaps some configuration on the WINDOWS SERVER that must be set for general global data to be passed from a 'form' type page? David F. -- 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
Re: [PHP] [NEWBIE] Cant get $_POST to work
That's it right there... Damn, why didn't I think of that. Hey David, what version of php are you running? Randy Johnson wrote: try $HTTP_POST_VARS maybe it is an older version of PHP Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [NEWBIE] Cant get $_POST to work
The Disguised Jedi wrote: i think you have to use the ID parameter in the input tag in your HTML Name: input type=text name=name value=your name id=name /br/ Age: input type=text name=age value=your age id=age /br/ try that and see how it goes If I'm not mistaken, ID in a form element will assign it a 'style', much the same way as 'class' does. It's been a while since I've done any HTML/CSS, so I could be wrong. -- 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] [NEWBIE] Cant get $_POST to work
Randy Johnson wrote: try $HTTP_POST_VARS maybe it is an older version of PHP Randy Good catch. -- 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] [NEWBIE] Cant get $_POST to work
Well, I guess I was wrong...I looked it up and that is correct...I couldn't remember which was the one that was needed to get the params in the right spot. -- The Disguised Jedi [EMAIL PROTECTED] Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm already internationally compatible! PHP rocks! Knowledge is Power. Power Corrupts. Go to school, become evil Disclaimer: Any disclaimer attached to this message may be ignored. However, I must say that the ENTIRE contents of this message are subject to other's criticism, corrections, and speculations. This message is Certified Virus Free -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php