ShaolinF Posted October 17, 2007 Share Posted October 17, 2007 Hey Guys, How would I implement the code below into php ? <div id="continue"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_s-xclick" /><input type="submit" value="Click to Continue >>" /><img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" /><input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIIcQYJKoZIhvcNAQcEoIIIYjCCCF4CAQExggEwMIIBLAIBADCB=-----END PKCS7----- " /></form> </div> Quote Link to comment https://forums.phpfreaks.com/topic/73673-include/ Share on other sites More sharing options...
BlueSkyIS Posted October 17, 2007 Share Posted October 17, 2007 use it as-is, but not inside the <?php ?> for instance: <?php $here = "is some PHP code."; echo $here; ?> <div id="continue"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_s-xclick" /><input type="submit" value="Click to Continue >>" /><img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" /><input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIIcQYJKoZIhvcNAQcEoIIIYjCCCF4CAQExggEwMIIBLAIBADCB=-----END PKCS7----- " /></form> </div> Quote Link to comment https://forums.phpfreaks.com/topic/73673-include/#findComment-371685 Share on other sites More sharing options...
ShaolinF Posted October 17, 2007 Author Share Posted October 17, 2007 What if Im using an IF statement ? [code=php:0]<?php if (mail($to, $subject, $mail, "From: ".$email_addr."\r\n")) { echo " Complete"; //Post form, button. } else { echo "Failed"; //refresh page, or contact administrator } $mail = str_replace("\n", "<br>", $mail); ?> [/code] Quote Link to comment https://forums.phpfreaks.com/topic/73673-include/#findComment-371689 Share on other sites More sharing options...
BlueSkyIS Posted October 17, 2007 Share Posted October 17, 2007 drop out of PHP: <?php if (mail($to, $subject, $mail, "From: ".$email_addr."\r\n")) { echo " Complete"; // Now, drop out of PHP into plain HTML ?> <div id="continue"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_s-xclick" /><input type="submit" value="Click to Continue >>" /><img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" /><input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIIcQYJKoZIhvcNAQcEoIIIYjCCCF4CAQExggEwMIIBLAIBADCB=-----END PKCS7----- " /></form> </div> <?php // back into PHP } else { echo "Failed"; //refresh page, or contact administrator } $mail = str_replace("\n", "<br>", $mail); ?> Quote Link to comment https://forums.phpfreaks.com/topic/73673-include/#findComment-371692 Share on other sites More sharing options...
ShaolinF Posted October 17, 2007 Author Share Posted October 17, 2007 Thanks Quote Link to comment https://forums.phpfreaks.com/topic/73673-include/#findComment-371694 Share on other sites More sharing options...
imago3d Posted October 17, 2007 Share Posted October 17, 2007 You can also put the Paypal code in to either an html file or a text file and then run a PHP include on it. That's what I do with my Googleads. Quote Link to comment https://forums.phpfreaks.com/topic/73673-include/#findComment-371695 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.