473,719 Members | 2,199 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" >
<td width="14%"><di v align="center">
<input type="radio" name="purchase" id="printed" value="printed" />
<td width="86%">pri nted
Order Printed Version <br />
$13.95 +
4.50 shipping &amp; handling</td>
<td><div align="center">
<input type="radio" name="purchase" id="pdf" value="pdf" />
<td> <div align="left">pd f
Order PDF Version (3.6MB PDF)</div></td>
<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 1843
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

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 the user to another form called correct.aspx)when clicked users will see the correct answers. I...
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 anyone has
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 paypal. When I click the return button on paypal at the end of the purchase process all of my session...
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 button. Since, I have the AutoPostBack to be true, the page loads again and the radio button for the...
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 are created dynamically and since I already have a button on my form that needs to be captured by...
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'; foreach ($_POST as $key => $value) { $value =...
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 them are just displaying $results instead of the actual database information. Does anyone know of...
by: Nicodemus | last post by:
Do You Belive? \ cheapbbc@sina.com wrote in news:aecf26b6-4c75-4d87-b09c-a7380875e0f3 @w34g2000prm.googlegroups.com:
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. and line 80 is where I try to use it again. Thanks <? include('../application.php');...
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 most users, this new feature is actually very convenient. If you want to control the update process,...
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
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: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.