Php Syntax Help

I am trying to get a paypal form working and I cannot seem to find the right syntax. I am using a config.php file to store variable. I define some variable at the top of the config file and then want to use them within the $PayPal_Form variable. How can i do that?

top variable example:

$paypal_email = ‘sales at mywebsite.com’;

PayPal form:
$PayPal_Form = ‘<form method=”post” target=”_self” action=”https://www.paypal.com/cgi-bin/webscr”>
<p align=”center”><input type=”hidden” name=”cmd” value=”_xclick”>
<input type=”hidden” name=”business” value=”.$paypal_email.”>
<input type=”hidden” name=”item_name” value=”.$directoryName”>
<input type=”hidden” name=”item_number” value>
<input type=”hidden” name=”return” value=”http://www.”.$domain_name.”/”.$directoryName.”/purchasesuccess.php”>
<input type=”hidden” name=”amount” value=”.$price2.”>
<input type=”hidden” name=”currency_code” value=”USD”>
<input type=”hidden” name=”quantity” value=”1″>
<input type=”hidden” name=”shipping” value=”0″>
<input type=”hidden” name=”shipping2″ value=”0″>
<input type=”hidden” name=”rm” value=”2″>
<input type=”hidden” name=”page_style” value=”.$paypal_page_style”>
<input type=”hidden” name=”notify_url” value=”http://www.”.$domain_name.”/”.$directory.”/paypal.php”>
<input type=”image” name=”I1″ src=”.$buynow_button_url.”>
</p></form>’;

HOw do i put the $paypal_email in the line. I thought putting the .’s around it would work, it is putting the $PayPal_Form into my webpage, but the variables are not being substituted.

I just need a little syntax help.

Thanks,

Leave a Reply

Your email address will not be published. Required fields are marked *