Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

How can I get database data and place it in the a web page being displayed?

I have a desktop program (Windows C# .NET) that has a GUID stored in a Firebird database.  PayPal has an optional field that I want to fill when the user clicks a Buy Now button on a webpage on my site.  The PayPal page, my webpage that displays the Buy Now button and the C# program all reside on the same machine.    

How do I get the GUID into the PayPal webpage once it's displayed on the user's machine (where the Firebird database is located)?  

This is to encrypt a registration date that will be sent to me from PayPal so I can send the encrypted date (using the GUID) back to the user after he pays the registration fee.
0
rmmarsh
Asked:
rmmarsh
  • 3
  • 3
1 Solution
 
EyalCommented:
use the custom field paypal is providing. this also will cause the response to get this value back.
fill this field with the value from the firebird database
0
 
rmmarshAuthor Commented:
Yes, that's the question:  HOW do I set the field?   This is the generated HTML on my webpage that I need to fill in os0...

<table>
<tr>
<td><input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_SM.gif" border="0" name="submit" /><td style="font-size: smaller;">
<input type="hidden" name="on0" value="GUID">&nbsp;&nbsp;&nbsp;&nbsp;Enter GUID:</td>
<td><input type="text" name="os0" maxlength="100"></td>
</td>
<td><img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"></td>
</tr>
</table>

Open in new window

How do I do that?
0
 
nap0leonCommented:
The GUID is in a database on the user's machine and you want to place it in your webpage?

Sounds like you would want the user to click a button from inside your application (on the client's machine).  That button could pass the GUID to your webpage so you can place it in the field.

Alternatively, you would want to give the user a way of accessing the GUID from inside your application so they can copy/paste or hand-key the GUID into the field.

Or is your question much simpler... you already have the GUID available and are wanting to know how to place that value into <input type="text" name="os0" maxlength="100"> ?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
rmmarshAuthor Commented:
Yes, it's the simpler question:  the GUID is in the program and is also stored in the Firebird database on the users machine.  When the user wants to renew his license, somehow I want to get the GUID from the program/database to the PayPal button field "os0".

Or is your question much simpler... you already have the GUID available and are wanting to know how to place that value into <input type="text" name="os0" maxlength="100"> ?
0
 
nap0leonCommented:
Based on your answer... I think what you are looking for is the first question, not the simpler one.  

For the simpler one, by "already available" I meant that your webpage already knew what the value was but you needed to know how to insert it into the field value.

But it seems you need to figure out how to get the value of the GUID *to* your webpage so that you can place it into the field, in which case I defer you back to the first two suggestions which is to provide a way for your application to pass the value to your webpage or for the user to pull up that value so they can key it in by hand.

As far as I know, you cannot execute a program on the client's machine from your webpage.  Surely there are ways around this using ActiveX objects, etc., but... that leads to a whole other set of issues and technical expertise and a re-categorization of the question may be required.

Since your client side application obviously has access to the database on the client's machine, let's presume you have a button in your application that launches the "Buy Now" webpage.  Your "Buy Now" button could simply open a webpage with the GUID as a parameter in the URL:
e.g.,
http://www.mycompany.com/buynow/?GUID=1234-5678

That way the GUID is available to your webpage so that it can be placed into the form field.

There are a variety of ways to do this...
without knowing what language your webpage is written in (ASP, .Net, PHP, etc.), you can use javascript to get the value of the parameter and place it into the os0 field.

Your example is missing the "form" tags, so I added them in the example attached.  open the file in your browser then add this to the URL;
?GUID=123

and "123" will magically appear in the GUID field.
URLparam.html
0
 
nap0leonCommented:
Check this earlier EE answer for a user with a similar question about passing a value to PayPal's os0 field:  http://www.experts-exchange.com/Web_Development/Internet_Marketing/E-Commerce/Q_27184343.html
0
 
rmmarshAuthor Commented:
Fantastic!  Exactly what I was looking for... thank you so much!
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now