Jump to content

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/73673-include/
Share on other sites

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>

Link to comment
https://forums.phpfreaks.com/topic/73673-include/#findComment-371685
Share on other sites

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]

Link to comment
https://forums.phpfreaks.com/topic/73673-include/#findComment-371689
Share on other sites

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);
?>

Link to comment
https://forums.phpfreaks.com/topic/73673-include/#findComment-371692
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.