Jump to content

Can someone tell me why my pho form code is not showing on the web?


oavs

Recommended Posts

Hi

 

Here is the code. I am no expert in php  :confused:

Thank you for your help.

 

<?php
print'
	<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
		<input name="q0" type="hidden" value="1">
		<input name="submit" type="image" src="https://www.paypal.com/en_AU/i/btn/btn_paynowCC_LG.gif" width="1" height="1" alt="PayPal - The safer, easier way to pay online." border="0" >
		<img alt="" border="0" src="https://www.paypal.com/en_AU/i/scr/pixel.gif" width="1" height="1" >
		<input type="hidden" name="add" value="1" >
		<input type="hidden" name="cmd" value="_s-xclick">
		<input type="hidden" name="business" value="[email protected]" >
		<input type="hidden" name="item_name" value="Canvas Order" >
		<input type="hidden" name="item_number" value="CAN" > 
		<input type="hidden" name="amount" value="<? echo $total ; ?>">
		<input type="hidden" name="shipping" value="0.00" >
		<input type="hidden" name="buyer_credit_promo_code" value="" >
		<input type="hidden" name="buyer_credit_product_category" value="" >
		<input type="hidden" name="buyer_credit_shipping_method" value="" >
		<input type="hidden" name="buyer_credit_user_address_change" value="" >
		<input type="hidden" name="no_shipping" value="0" >
		<input type="hidden" name="no_note" value="1" >
		<input type="hidden" name="currency_code" value="AUD" >
		<input type="hidden" name="tax" value="0.00" >
		<input type="hidden" name="lc" value="AU" >
		<input type="hidden" name="bn" value="PP-ShopCartBF" >
	</form>';

?>

 

<input name="submit" type="image" src="https://www.paypal.com/en_AU/i/btn/btn_paynowCC_LG.gif" width="1" height="1" alt="PayPal - The safer, easier way to pay online." border="0" >

 

You have an 1x1 image what do you want to see in your page?

You'll see an 1x1 image in the top left corner...

Actually problem wasn't that. It was a missing PayPal code.

 

<input type="hidden" name="hosted_button_id" value="X3PRABCDEX822L4">

 

Ok Now that is sorted out I have a different but same form issue.

 

Little explanation first.

 

I have a form (like a contact form) which user selects the item and the price. When submitted it is presentaed by another page of the summary of the the order including the total amount.

 

 

What I really really want to do (and this is where your expertise is required) is to place the Total amount into the paypal's form.

 

In the paypay (2nd form page) I do have this

<input type="hidden" name="amount" value="<?php echo $total; ?>">

  and my 'total' field name is also called total in my first form page. I also did this in the first form page


...form here 
...
<input name="total" type="text" class="field text medium" id="total" tabindex="20" value="" maxlength="255" />

</form><?php
$total=$_POST['total'];
?>

So how do I  get the value from my first form into paypal's form on the second page?

 

I'll needed to be  shown please :-)

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.