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.
Who is Participating?
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:

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;

and "123" will magically appear in the GUID field.
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
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...

<td><input type="image" src="" 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><img alt="" border="0" src="" width="1" height="1"></td>

Open in new window

How do I do that?
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

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"> ?
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"> ?
Check this earlier EE answer for a user with a similar question about passing a value to PayPal's os0 field:
rmmarshAuthor Commented:
Fantastic!  Exactly what I was looking for... thank you so much!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.