473,548 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trying to customize paypal variables with radio box results

1 New Member
Could someone please tell my why this won't work. THe value purchase.value seems to be blank. Is there any way to get the value of a radio box?

<table width="57%" border="0" align="center" cellpadding="5" cellspacing="5" >
<tr>
<td width="14%"><di v align="center">
<input type="radio" name="purchase" id="printed" value="printed" />
</div></td>
<td width="86%">pri nted
Order Printed Version <br />
$13.95 +
4.50 shipping &amp; handling</td>
</tr>
<tr>
<td><div align="center">
<input type="radio" name="purchase" id="pdf" value="pdf" />
</div></td>
<td> <div align="left">pd f
Order PDF Version (3.6MB PDF)</div></td>
</tr>
</table>
<p align="center">
<form id="form1" name="form1" action="https://www.sandbox.pay pal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" >
<input type="hidden" name="business" value="3L92AW5Y FFSAU">
<input type="hidden" name="lc" value="US">
<? if ($purchase.valu e == "printed"){ ?>
<input type="hidden" name="amount" value="13.95">
<input type="hidden" name="shipping" value="4.50">
<? } else { ?>
<input type="hidden" name="notify_ur l" value="http://www.timespaceor g.com/paypal.php">
<input type="hidden" name="amount" value="11.95">
<? } ?>
<input type="hidden" name="currency_ code" value="USD">
<input type="hidden" name="button_su btype" value="products ">
<input type="hidden" name="cn" value="Add special instructions to the seller">
<input type="hidden" name="return" value="http://www.timespaceor g.com/thankyou.html">
<input type="hidden" name="cancel_re turn" value="http://www.timespaceor g.com/order_book.php" >

<input type="hidden" name="no_shippi ng" value="2">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_bu ynowCC_LG.gif:N onHosted">
<input type="image" src="https://www.sandbox.pay pal.com/en_US/i/btn/btn_buynowCC_LG .gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.pay pal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form>
Dec 31 '09 #1
1 1836
code green
1,726 Recognized Expert Top Contributor
Your code is hard to follow without CODE tags.
But you are not reading the $_POST variables.
Register global variables were turned off a few versions ago
And this is a mixture of javascript and php
Expand|Select|Wrap|Line Numbers
  1. if ($purchase.value
I suggest studying PHP basics before you go any further.
Dec 31 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1488
by: hansen | last post by:
hi all, I am creating online quiz (10 questions) with radio buttions (Yes/No). When the user clicks on the submit button i do some calculation and based on that calculation i display result.aspx page with the proper scors. so far so good. within the result.aspx page i have a link says "to view the proper answer click here" (which will direct...
0
2894
by: rgparkins | last post by:
HI I have 2 problems, 1 of which is tied to PHP and 1 loosely tied, so I'll put this out there. Got a problem that I have been working on for a while now which involves implementing the Paypal IPN. I am using PHP 4 to automatically post back to Paypal and I am using curl package. I am doing a Custom request and would like to know if...
2
4173
by: Tommy | last post by:
I have written some code to use paypal for users to make purchases from my site. I am using the paypal instant payment notification. When i get the notification from paypal I send the user an email with registration key. I can pass data to that page with the custom field with no problem. The problem is after I redirect from my page to...
3
4174
by: itissandeep | last post by:
I have a simple application that has a map. The user has to select two sets from a single type of feature from the map. I use two radio buttons under same GroupName for each set. When the page loads for the first time, one radio button is checked (obviously the other is unchecked). The user selects for one set and checks the other radio...
5
2728
by: Jason James | last post by:
Guys, it seems that several people have enquired about how to communicate with Paypal as securely as possible. It is obvious that placing the shopping cart details in the URL is about as insecure as could be. Therefore why not use a POST and hide them in hidden variables? Well I would if I could figure it out. The contents of the cart...
2
1743
by: t0m66 | last post by:
I've got a setup for my online game for upgraded accounts. However, I'm unable to communicate with Paypal's IPN sandbox server. Does anyone have any experience with Paypal's IPN and, if so, can someone help me out? case 'validate': // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate'; ...
1
1572
by: arggg | last post by:
I have an external html that is a form. the Values of the form elements have <?= $results ?> type information however with file_get_contents in the main php file that then stores the contents to a variable so it can return ALL the data is not completeing the variable processing of the HTML FILE. For example the values that have $results in...
0
1747
by: Nicodemus | last post by:
Do You Belive? \ cheapbbc@sina.com wrote in news:aecf26b6-4c75-4d87-b09c-a7380875e0f3 @w34g2000prm.googlegroups.com:
3
1789
by: nathanwb | last post by:
I have the following php code, at the top I am pulling a piece of data from a query and I echo the results with no problem, I am using Ajax with this page as well and further down the page when I try to reference the same $radio it dosnt show anything. Line 7 is where i get the current radio number assigned to the person that is loged in. ...
0
7512
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7438
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7707
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7803
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6036
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3475
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.