Forum Moderators: coopster

Message Too Old, No Replies

Form to insert mysql row *and* POST data

         

jonparker83

11:57 am on Feb 11, 2005 (gmt 0)

10+ Year Member



Hi there,

I'm reasonably new to PHP and after searching all over the place can't find anything useful

I need to insert some variables into a mysql row and then POST variables to another web page using the same form

The page i'm posting to is an SSL (bank hosted)ecommerce transaction page which I have no powers to change

I don't have any problems inserting just mysql rows or making html forms to post separately, I just don't know where to start to get the one form to do both

Any help would be GREATLY received

Thanks a lot

Jon :)

villan

5:30 pm on Feb 11, 2005 (gmt 0)

10+ Year Member



It seems you need to access the http protocol directly, and craft your own POST headers. I found an older article that does this in a function:

[zend.com...]

There are probally better ways to do this, I would check [pear.php.net...] or some such.

As you know, you will basically have the user send the form data to a php script that will interpret it, pass the data along via POST to your destination, and enter it into your mysql db. Remember: since php is on the server, you can craft your headers and send the user along to their destination, and THEN do your own mysql stuff. This really speeds things up from the users point of view, makes pages a lot more snappy.

jatar_k

6:15 pm on Feb 11, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld jonparker83,

another option is cURL [php.net]

jonparker83

8:43 am on Feb 14, 2005 (gmt 0)

10+ Year Member



Thanks a lot for the help and the welcome...

Crafting my own headers has seemed to do the trick nicely :)

Hagii

4:41 am on Feb 25, 2005 (gmt 0)



Im new to php although I understand a lot, I would love to get instruction on the following though

s you know, you will basically have the user send the form data to a php script that will interpret it, pass the data along via POST to your destination, and enter it into your mysql db. Remember: since php is on the server, you can craft your headers and send the user along to their destination, and THEN do your own mysql stuff. This really speeds things up from the users point of view, makes pages a lot more snappy.