[PHP] Posting a value to one form to another
Hello , a href=Delay.php?hid=?php echo $hid+1; ?img src=Gif/nextque.gif border=0/a While clicking this link the $hid value get incremented and fetch the value from the database according to that..the same thing is working in linux platform and it is not working for the windows platform..the value is not getting increment..Can anyone please tell me how to go about with this..?? Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Posting a value to one form to another
Must be a register globals problem again - php.ini (register_globals) - on for linux off for windows. You should keep it switched off (or at least code for it being off) and use the superglobal arrays $_POST, $_GET etc Debbie - Original Message - From: Uma Shankari T. [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Saturday, September 28, 2002 9:42 AM Subject: [PHP] Posting a value to one form to another Hello , a href=Delay.php?hid=?php echo $hid+1; ?img src=Gif/nextque.gif border=0/a While clicking this link the $hid value get incremented and fetch the value from the database according to that..the same thing is working in linux platform and it is not working for the windows platform..the value is not getting increment..Can anyone please tell me how to go about with this..?? Regards, Uma -- 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
[PHP] Posting a value to one form to another
Hello , a href=Delay.php?hid=?php echo $hid+1; ?img src=Gif/nextque.gif border=0/a While clicking this link the $hid value get incremented and fetch the value from the database according to that..the same thing is working in linux platform and it is not working for the windows platform..the value is not getting increment..Can anyone please tell me how to go about with this..?? Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Posting a value to one form to another
You are using method GET correct? This will not work for POST's on any platform that I know of. Browser default behavior for clicks are GET. You could create a custom browser to POST all clicks..but wouldn't work very well :) Only reason I am asking is Posting a value ...though Posting might != POST :) On the receiving form ... try the following code and see if anything looks out of place. ## echo $_SERVER['REQUEST_METHOD'].'br/br/'; echo 'GETbr/'; foreach ($_GET as $key = $value) { echo Key: $key; Value: $valuebr/; } echo 'POSTbr/'; foreach ($_POST as $key = $value) { echo Key: $key; Value: $valuebr/; } die; ##3 Cheers, -Peter -Original Message- From: Uma Shankari T. [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 29, 2002 05:45 To: PHP Subject: [PHP] Posting a value to one form to another Hello , a href=Delay.php?hid=?php echo $hid+1; ?img src=Gif/nextque.gif border=0/a While clicking this link the $hid value get incremented and fetch the value from the database according to that..the same thing is working in linux platform and it is not working for the windows platform..the value is not getting increment..Can anyone please tell me how to go about with this..?? Regards, Uma -- 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] Posting a value to one form to another
I think your linux plattform has a version of PHP older than 4.2.0 and your Windows machine has a newer Version. In this old Versions, Register_Globals was turned on. Try to access $hid by using: ?php echo $_GET['hid']; ? Regards Sascha Hello , a href=Delay.php?hid=?php echo $hid+1; ?img src=Gif/nextque.gif border=0/a While clicking this link the $hid value get incremented and fetch the value from the database according to that..the same thing is working in linux platform and it is not working for the windows platform..the value is not getting increment..Can anyone please tell me how to go about with this..?? Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Posting a value to one form to another
Hello, On Sun, 29 Sep 2002, Sascha Cunz wrote: SCI think your linux plattform has a version of PHP older than 4.2.0 and your SCWindows machine has a newer Version. In this old Versions, Register_Globals SCwas turned on. SCTry to access $hid by using: ?php echo $_GET['hid']; ? SC I have tried like the code you have mentioned above..it is not fetching..Actually it is displaying in the url bar correctly with the incremented $hid value..but displaying the result correspond to the $hid initial value..Can anyone please tell me how to go about with this..?? Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Posting a value to one form to another
Oops, of course you must add one to it, too. like: ?php echo $_GET['hid']+1; ? Regards, Sascha Hello, On Sun, 29 Sep 2002, Sascha Cunz wrote: SCI think your linux plattform has a version of PHP older than 4.2.0 and your SCWindows machine has a newer Version. In this old Versions, Register_Globals SCwas turned on. SCTry to access $hid by using: ?php echo $_GET['hid']; ? SC I have tried like the code you have mentioned above..it is not fetching..Actually it is displaying in the url bar correctly with the incremented $hid value..but displaying the result correspond to the $hid initial value..Can anyone please tell me how to go about with this..?? Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Posting a value to one form to another
Hello, On Sun, 29 Sep 2002, Sascha Cunz wrote: SCOops, of course you must add one to it, too. like: SC?php echo $_GET['hid']+1; ? SC Still it is incrementing but not fetching the value correspond from the database..In linux paltform it is working without any error..Can anyone please tell me how to go about with this..?? or any setting have to be made in php.ini file to enable this.. Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Posting a value to one form to another
Uma, So, you are saying your URL looks something like this: http://example.org/delay.php?hid=4 And, when you output the value of $_GET[hid], it outputs 3? Uma Shankari T. wrote: Actually it is displaying in the url bar correctly with the incremented $hid value..but displaying the result correspond to the $hid initial value..Can anyone please tell me how to go about with this..?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Posting a value to one form to another
Uma, I'm sorry, but I'm still confused. Maybe someone else better understands your question. Given the following example script, delay.php: ? echo $_GET[hid]; ? A URL such as http://example.org/delay.php?hid=4 will output the following: 4 Are you saying this is not happening? This is what it sounds like you are saying, but I have a hard time believing it. Chris Uma Shankari T. wrote: Hello, CS CSSo, you are saying your URL looks something like this: CS CShttp://example.org/delay.php?hid=4 Yes..my url is look like this only.. CS CSAnd, when you output the value of $_GET[hid], it outputs 3? CS But in the url the value are getting incremented and it is displaying the result correspond to the value 1 only ..Can anyone please tell me how to go about with this..?? Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Posting a value to one form to another
Hello, On Sun, 29 Sep 2002, Chris Shiflett wrote: CSUma, CS CSI'm sorry, but I'm still confused. Maybe someone else better understands CSyour question. CS CSGiven the following example script, delay.php: CS CS? CSecho $_GET[hid]; CS? CS CSA URL such as http://example.org/delay.php?hid=4 will output the following: CS CS4 CS Actually it is displaying this in the url output and in the screen it is displaying the answer correspond to the value 1..Now you got... Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php