Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

1 button two actions.

Status
Not open for further replies.

wudz

Programmer
Mar 28, 2001
135
GB
Hi,
I have a button on an html page whos FORM action is assigned to an http link with method.. post.

Is it possible to pass the click to an associated PHP script leaving the form, action and method as is.
My point for this is to place a flag in the db to confirm that the action has occured.
This allows checks that the user left the site by the official route and when returned to the confirm page this could then be verified.

Cheers in anticipation
John
 
Hi sleipnir, poor explaination..

I have three Paypal supplied buttons of which only one is displayed at anyone time. Html for one button below..
<?
if ($purcredit==3){ ?>
<form action=" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src=" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIH-----END PKCS7-----
">
</form>
<? } ?>

I wish to also register the post in htmls associated php so that I may send a flag to the relevent table that the button has been pressed..or is there a work round, so that the above is sent via php using a re assigning the form to post to the PHP, I could then get the flag I require...

sleipnir,any better...hi

Cheers

John
 
I think I understand. You need the submitted data to be sent to both PayPal and your script, right?

Unfortunately, you can only submit data to one or the other. But you can submit the data to a PHP script that then takes that data and passed it along to PayPal.

Take a look at faq434-2502 to see how PHP can send post-method data to another script.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Spot on,
I was hoping that there may be a way with an alteration...drat...
No the problem for me arises as to how I work the script to allow the post from there. I can alter the html side to send the relevant post to the php and perhaps the logic....but I have never posted out from PHP...still learning though......SLOWLY!!

Any help would be appreciated

Cheers

John
 
Sorry Slepnir,

I did not fully read your last post and now going to the link in the FAQ..got the grandchildren over and my time at present is zero...just got them to bed, now back to my site.

I will let you know how I get on and many thanks again for all your help..

Cheers

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top