RE: stuck on minor php problem

  • From: "Jim" <jhomme1028@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Wed, 2 Jun 2010 23:44:13 -0400

Hi Laura,
If I understand what you're trying to do, you have a separate form on an
HTML page. You have a PHP script that will get the data from the HTML page.
The user presses the submit button from the HTML page, and the PHP form
finds the data and does its thing. 

Here's what you do.

You code the action attribute of the form so that it has the name of your
PHP script in it. That passes the data to your PHP script. The field names
from your HTML page can be found in the __post__ array. Check to make sure I
have that array name correct. This array is a dictionary. The field names
are the keys, and the values are the values that got submitted from the HTML
page. If you have groups of check boxes, they'll be in single dimension
arrays. I know you can find an example of this in the PHP documentation from
http://www.nonvisualdevelopment.org. In there, you'll find a little book
called PHP Essentials. I think an example that shows this is in chapter 3 or
chapter 4. 

Jim

Jim Homme
Skype: jim.homme
"Every day's a gift."


-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of qubit
Sent: Wednesday, June 02, 2010 7:26 PM
To: bprogramming; bwebbers
Subject: stuck on minor php problem

Hi all -- I know someone must have done this, but I have searched the php 
docs and can't find a way to submit a form from within an intermediate page.

Someone please tell me this is easy...*smile*

I have a simple form with a submit button that I need to process in an 
intermediate CGI file written in php.  For reference, the intermediate file 
is called nittygritty.php.
It is quite simple -- all I want is to be able to print and email some 
things and then automatically submit the requisit form to paypal.
I don't want to present the form to the user as he/she has already entered 
the data on a previous page. It is going to be invisible to the user.

The form in nittygritty.php has a form action equal to the paypal page --  
that's fine. I also have a bunch of hidden form fields giving relevant 
parameters to paypal.  I also have the results of the previous page that I 
put into the form. Then I have a submit button.

Now I want that form to be submitted to paypal.  I can't seem to do it -- do

I have to present the page to the user to press the button again? or is 
there a way to send the http header and the parameters to paypal?

I've been hacking this site -- not this particular problem, but the site as 
a whole -- since Sunday and I want it to be done tonight. Could someone 
knowledgeable of php please enlighten me on form submission.
I did a search on php.net for submit, send, action and a bunch of other 
strings. I found some interesting functions, but none what I wanted.

Thanks in advance for any info!
--le

__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: