[PHP] Submitting to cgi script
How can I do this I have a form that I want to submit to a second php script that in turn submits to a cgi script but I can not get it to work. If I submit from the form to the cgi script it works just fine. But there are something that I need to do with the data besides submitting to the cgi script. Could you look at the sample code below and see if I am doing something wrong. I hope this makes sense I am not quit sure how to ask what I want to know If I was submitting directly to the cgi script the form action would look like this FORM ACTION=/cgi-bin/siteUserEmail/siteUserEmail.cgi METHOD=POST FORM ACTION=siteUserEmail.php METHOD=POST INPUT TYPE=TEXT NAME=forwardaddr SIZE=32 VALUE= TEXTAREA NAME=aliases ROWS=5 COLS=32/TEXTAREA INPUT TYPE=CHECKBOX NAME=vacationmode VALUE=on TEXTAREA NAME=vacationmsg ROWS=5 COLS=32/TEXTAREA INPUT TYPE=HIDDEN NAME=name SIZE=-1 VALUE=tester54321 INPUT TYPE=HIDDEN NAME=group SIZE=-1 VALUE=site53 INPUT TYPE=HIDDEN NAME=page SIZE=-1 VALUE=siteuseremail input type=submit name=Submit value=submit /FORM The siteUserEmail.php file ? $cmd=/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr aliases=$aliasesvacationmode=$vacationmodevacationmsg=$vacationmsg name=$namegroup=$grouppage=$page; exec($cmd); ? -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submitting to cgi script
In your example you are using the method of POST to pass the form data to the cgi script. However, when you pass the data to the cgi script from the php script you are using the GET method to pass the data. Check and see if the cgi can accept with METHOD=GET .: B i g D o g :. - Original Message - From: [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Sunday, July 21, 2002 5:46 PM Subject: [PHP] Submitting to cgi script How can I do this I have a form that I want to submit to a second php script that in turn submits to a cgi script but I can not get it to work. If I submit from the form to the cgi script it works just fine. But there are something that I need to do with the data besides submitting to the cgi script. Could you look at the sample code below and see if I am doing something wrong. I hope this makes sense I am not quit sure how to ask what I want to know If I was submitting directly to the cgi script the form action would look like this FORM ACTION=/cgi-bin/siteUserEmail/siteUserEmail.cgi METHOD=POST FORM ACTION=siteUserEmail.php METHOD=POST INPUT TYPE=TEXT NAME=forwardaddr SIZE=32 VALUE= TEXTAREA NAME=aliases ROWS=5 COLS=32/TEXTAREA INPUT TYPE=CHECKBOX NAME=vacationmode VALUE=on TEXTAREA NAME=vacationmsg ROWS=5 COLS=32/TEXTAREA INPUT TYPE=HIDDEN NAME=name SIZE=-1 VALUE=tester54321 INPUT TYPE=HIDDEN NAME=group SIZE=-1 VALUE=site53 INPUT TYPE=HIDDEN NAME=page SIZE=-1 VALUE=siteuseremail input type=submit name=Submit value=submit /FORM The siteUserEmail.php file ? $cmd=/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr aliases=$aliasesvacationmode=$vacationmodevacationmsg=$vacationmsg name=$namegroup=$grouppage=$page; exec($cmd); ? -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- 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[2]: [PHP] Submitting to cgi script
Hello B, I just submitted directly to the cgi script and did it with a GET and it worked so that is not the problem. Any other suggestions Sunday, July 21, 2002, 4:52:09 PM, you wrote: BigDog In your example you are using the method of POST to pass the form data to BigDog the cgi script. However, when you pass the data to the cgi script from the BigDog php script you are using the GET method to pass the data. BigDog Check and see if the cgi can accept with METHOD=GET BigDog .: B i g D o g :. BigDog - Original Message - BigDog From: [EMAIL PROTECTED] BigDog To: php-general [EMAIL PROTECTED] BigDog Sent: Sunday, July 21, 2002 5:46 PM BigDog Subject: [PHP] Submitting to cgi script How can I do this I have a form that I want to submit to a second php script that in turn submits to a cgi script but I can not get it to work. If I submit from the form to the cgi script it works just fine. But there are something that I need to do with the data besides submitting to the cgi script. Could you look at the sample code below and see if I am doing something wrong. I hope this makes sense I am not quit sure how to ask what I want to know If I was submitting directly to the cgi script the form action would look like this FORM ACTION=/cgi-bin/siteUserEmail/siteUserEmail.cgi METHOD=POST FORM ACTION=siteUserEmail.php METHOD=POST INPUT TYPE=TEXT NAME=forwardaddr SIZE=32 VALUE= TEXTAREA NAME=aliases ROWS=5 COLS=32/TEXTAREA INPUT TYPE=CHECKBOX NAME=vacationmode VALUE=on TEXTAREA NAME=vacationmsg ROWS=5 COLS=32/TEXTAREA INPUT TYPE=HIDDEN NAME=name SIZE=-1 VALUE=tester54321 INPUT TYPE=HIDDEN NAME=group SIZE=-1 VALUE=site53 INPUT TYPE=HIDDEN NAME=page SIZE=-1 VALUE=siteuseremail input type=submit name=Submit value=submit /FORM The siteUserEmail.php file ? $cmd=/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr aliases=$aliasesvacationmode=$vacationmodevacationmsg=$vacationmsg name=$namegroup=$grouppage=$page; exec($cmd); ? -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] Submitting to cgi script
Instead of doing it as a command, try it through the webserver ?php header( Location: http://localhost/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwar daddraliases=$aliasesvacationmode=$vacationmodevacationmsg=$vacationmsgn ame=$namegroup=$grouppage=$page ); ? Or you can use something else...but send it to the web server... .: B i g D o g :. - Original Message - From: [EMAIL PROTECTED] To: B i g D o g [EMAIL PROTECTED]; php-general [EMAIL PROTECTED] Sent: Sunday, July 21, 2002 6:15 PM Subject: Re[2]: [PHP] Submitting to cgi script Hello B, I just submitted directly to the cgi script and did it with a GET and it worked so that is not the problem. Any other suggestions Sunday, July 21, 2002, 4:52:09 PM, you wrote: BigDog In your example you are using the method of POST to pass the form data to BigDog the cgi script. However, when you pass the data to the cgi script from the BigDog php script you are using the GET method to pass the data. BigDog Check and see if the cgi can accept with METHOD=GET BigDog .: B i g D o g :. BigDog - Original Message - BigDog From: [EMAIL PROTECTED] BigDog To: php-general [EMAIL PROTECTED] BigDog Sent: Sunday, July 21, 2002 5:46 PM BigDog Subject: [PHP] Submitting to cgi script How can I do this I have a form that I want to submit to a second php script that in turn submits to a cgi script but I can not get it to work. If I submit from the form to the cgi script it works just fine. But there are something that I need to do with the data besides submitting to the cgi script. Could you look at the sample code below and see if I am doing something wrong. I hope this makes sense I am not quit sure how to ask what I want to know If I was submitting directly to the cgi script the form action would look like this FORM ACTION=/cgi-bin/siteUserEmail/siteUserEmail.cgi METHOD=POST FORM ACTION=siteUserEmail.php METHOD=POST INPUT TYPE=TEXT NAME=forwardaddr SIZE=32 VALUE= TEXTAREA NAME=aliases ROWS=5 COLS=32/TEXTAREA INPUT TYPE=CHECKBOX NAME=vacationmode VALUE=on TEXTAREA NAME=vacationmsg ROWS=5 COLS=32/TEXTAREA INPUT TYPE=HIDDEN NAME=name SIZE=-1 VALUE=tester54321 INPUT TYPE=HIDDEN NAME=group SIZE=-1 VALUE=site53 INPUT TYPE=HIDDEN NAME=page SIZE=-1 VALUE=siteuseremail input type=submit name=Submit value=submit /FORM The siteUserEmail.php file ? $cmd=/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr aliases=$aliasesvacationmode=$vacationmodevacationmsg=$vacationmsg name=$namegroup=$grouppage=$page; exec($cmd); ? -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- 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[4]: [PHP] Submitting to cgi script
Hello Ray, This worked now my question is. Is there a way to force it to submit with POST rather than GET Sunday, July 21, 2002, 5:12:30 PM, you wrote: RH Instead of doing it as a command, try it through the webserver RH ?php RH header( Location: RH http://localhost/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwar RH daddraliases=$aliasesvacationmode=$vacationmodevacationmsg=$vacationmsgn RH ame=$namegroup=$grouppage=$page ); ? RH Or you can use something else...but send it to the web server... RH .: B i g D o g :. RH - Original Message - RH From: [EMAIL PROTECTED] RH To: B i g D o g [EMAIL PROTECTED]; php-general RH [EMAIL PROTECTED] RH Sent: Sunday, July 21, 2002 6:15 PM RH Subject: Re[2]: [PHP] Submitting to cgi script Hello B, I just submitted directly to the cgi script and did it with a GET and it worked so that is not the problem. Any other suggestions Sunday, July 21, 2002, 4:52:09 PM, you wrote: BigDog In your example you are using the method of POST to pass the form RH data to BigDog the cgi script. However, when you pass the data to the cgi script RH from the BigDog php script you are using the GET method to pass the data. BigDog Check and see if the cgi can accept with METHOD=GET BigDog .: B i g D o g :. BigDog - Original Message - BigDog From: [EMAIL PROTECTED] BigDog To: php-general [EMAIL PROTECTED] BigDog Sent: Sunday, July 21, 2002 5:46 PM BigDog Subject: [PHP] Submitting to cgi script How can I do this I have a form that I want to submit to a second php script that in turn submits to a cgi script but I can not get it to work. If I submit from the form to the cgi script it works just fine. But there are something that I need to do with the data besides submitting to the cgi script. Could you look at the sample code below and see if I am doing something wrong. I hope this makes sense I am not quit sure how to ask what I want to know If I was submitting directly to the cgi script the form action would look like this FORM ACTION=/cgi-bin/siteUserEmail/siteUserEmail.cgi METHOD=POST FORM ACTION=siteUserEmail.php METHOD=POST INPUT TYPE=TEXT NAME=forwardaddr SIZE=32 VALUE= TEXTAREA NAME=aliases ROWS=5 COLS=32/TEXTAREA INPUT TYPE=CHECKBOX NAME=vacationmode VALUE=on TEXTAREA NAME=vacationmsg ROWS=5 COLS=32/TEXTAREA INPUT TYPE=HIDDEN NAME=name SIZE=-1 VALUE=tester54321 INPUT TYPE=HIDDEN NAME=group SIZE=-1 VALUE=site53 INPUT TYPE=HIDDEN NAME=page SIZE=-1 VALUE=siteuseremail input type=submit name=Submit value=submit /FORM The siteUserEmail.php file ? $cmd=/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr aliases=$aliasesvacationmode=$vacationmodevacationmsg=$vacationmsg name=$namegroup=$grouppage=$page; exec($cmd); ? -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[4]: [PHP] Submitting to cgi script
This worked now my question is. Is there a way to force it to submit with POST rather than GET Look at the CURL functions on php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php