473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Trying to customize paypal variables with radio box results

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%"><div align="center">
<input type="radio" name="purchase" id="printed" value="printed" />
</div></td>
<td width="86%">printed
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">pdf
Order PDF Version (3.6MB PDF)</div></td>
</tr>
</table>
<p align="center">
<form id="form1" name="form1" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="3L92AW5YFFSAU">
<input type="hidden" name="lc" value="US">
<? if ($purchase.value == "printed"){ ?>
<input type="hidden" name="amount" value="13.95">
<input type="hidden" name="shipping" value="4.50">
<? } else { ?>
<input type="hidden" name="notify_url" value="http://www.timespaceorg.com/paypal.php">
<input type="hidden" name="amount" value="11.95">
<? } ?>
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="cn" value="Add special instructions to the seller">
<input type="hidden" name="return" value="http://www.timespaceorg.com/thankyou.html">
<input type="hidden" name="cancel_return" value="http://www.timespaceorg.com/order_book.php">

<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<input type="image" src="https://www.sandbox.paypal.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.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form>
Dec 31 '09 #1
1 1823
code green
1,726 Expert 1GB
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
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...
0
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...
2
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...
3
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...
5
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...
2
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...
1
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...
0
by: Nicodemus | last post by:
Do You Belive? \ cheapbbc@sina.com wrote in news:aecf26b6-4c75-4d87-b09c-a7380875e0f3 @w34g2000prm.googlegroups.com:
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.