Loading ...
Sorry, an error occurred while loading the content.

Re: Transfer data from LB program to web page text box

Expand Messages
  • Lorne Russell
    Well I figured out how to encode the data in the URL by just adding it at the end of the url preceded by a ? for example
    Message 1 of 7 , Nov 1, 2009
    • 0 Attachment
      Well I figured out how to encode the data in the URL by just adding it at the end of the url preceded by a ? for example

      www.libertbybasic.com?serial=12345-67890

      Now I need to know how the webpage can extract that data and put it in the textbox for me.

      Also trying to find a script that forces the user to enter their email address twice and then the web page checks both are identical before processing the form.

      I'm not very knowledgeable about HTML stuff - any help would be appreciated.

      Lorne Russell

      ----- Original Message -----
      From: Lorne Russell
      To: Lorne Russell
      Sent: Sunday, November 01, 2009 7:45 AM
      Subject: Transfer data from LB program to web page text box


      Hi:

      I am trying to set up online registration of my LB products.

      I would like to transfer a serial number like "12345-67890" from my LB program to a textbox in a web page, so the user will not have to type it in himself. I can open the web page fine using ShellExecuteA.

      Is there some way to place the serial number in the URL and then have the webpage extract that serial number from the URL and put it in the textbox?

      Many thanks,

      Lorne Russell


      [Non-text portions of this message have been removed]
    • torpidai
      Lorne, For that, HTML is no good to you, HTML, is, as it s name suggests, just Mark-up , for what you need, I d suggest looking into Php with database of your
      Message 2 of 7 , Nov 1, 2009
      • 0 Attachment
        Lorne,

        For that, HTML is no good to you, HTML, is, as it's name suggests, just "Mark-up", for what you need, I'd suggest looking into Php with database of your preference, many free hosts offer SQL:)

        There are other ways of course, but php is the way I'd go, and sorry I can't offer you any code, it's been years since I did similar for my secondlife.

        regards

        Mick (Torpidai)



        --- In libertybasic@yahoogroups.com, "Lorne Russell" <lorneokb@...> wrote:
        >
        > Well I figured out how to encode the data in the URL by just adding it at the end of the url preceded by a ? for example
        >
        > www.libertbybasic.com?serial=12345-67890
        >
        > Now I need to know how the webpage can extract that data and put it in the textbox for me.
        >
        > Also trying to find a script that forces the user to enter their email address twice and then the web page checks both are identical before processing the form.
        >
        > I'm not very knowledgeable about HTML stuff - any help would be appreciated.
        >
        > Lorne Russell
        >
        > ----- Original Message -----
        > From: Lorne Russell
        > To: Lorne Russell
        > Sent: Sunday, November 01, 2009 7:45 AM
        > Subject: Transfer data from LB program to web page text box
        >
        >
        > Hi:
        >
        > I am trying to set up online registration of my LB products.
        >
        > I would like to transfer a serial number like "12345-67890" from my LB program to a textbox in a web page, so the user will not have to type it in himself. I can open the web page fine using ShellExecuteA.
        >
        > Is there some way to place the serial number in the URL and then have the webpage extract that serial number from the URL and put it in the textbox?
        >
        > Many thanks,
        >
        > Lorne Russell
        >
        >
        > [Non-text portions of this message have been removed]
        >
      • Robert Lawson
        My bad, I d assumed you d need the website to parse the data too. You should find something to help you here :- http://javascript.internet.com/forms/ though
        Message 3 of 7 , Nov 1, 2009
        • 0 Attachment
          My bad, I'd assumed you'd need the website to parse the data too.

          You should find something to help you here :-
          http://javascript.internet.com/forms/ though I'd still suggest Php being the
          way to go, and there are many free Php code sources too.


          [Non-text portions of this message have been removed]
        • Lorne Russell
          Well after several exasperating hours I finally figured it out. I had to label my webpage with the extension .php then extract the serial number with
          Message 4 of 7 , Nov 1, 2009
          • 0 Attachment
            Well after several exasperating hours I finally figured it out. I had to

            label my webpage with the extension .php
            then extract the serial number with <?php $serial=$_GET["serial] ?>
            then insert the serial number in the textbox with value=<?php echo $serial;?>

            Lorne

            ----- Original Message -----
            From: Lorne Russell
            To: libertybasic@yahoogroups.com
            Sent: Sunday, November 01, 2009 9:01 AM
            Subject: Re: Transfer data from LB program to web page text box


            Well I figured out how to encode the data in the URL by just adding it at the end of the url preceded by a ? for example

            www.libertbybasic.com?serial=12345-67890

            Now I need to know how the webpage can extract that data and put it in the textbox for me.

            Also trying to find a script that forces the user to enter their email address twice and then the web page checks both are identical before processing the form.

            I'm not very knowledgeable about HTML stuff - any help would be appreciated.

            Lorne Russell

            ----- Original Message -----
            From: Lorne Russell
            To: Lorne Russell
            Sent: Sunday, November 01, 2009 7:45 AM
            Subject: Transfer data from LB program to web page text box


            Hi:

            I am trying to set up online registration of my LB products.

            I would like to transfer a serial number like "12345-67890" from my LB program to a textbox in a web page, so the user will not have to type it in himself. I can open the web page fine using ShellExecuteA.

            Is there some way to place the serial number in the URL and then have the webpage extract that serial number from the URL and put it in the textbox?

            Many thanks,

            Lorne Russell


            [Non-text portions of this message have been removed]
          • Robert Lawson
            hehe, yes, I blame BASIC for my lack of understanding of syntax when it comes toother languages, all fun and games hu? WTG for getting there that quickly, took
            Message 5 of 7 , Nov 1, 2009
            • 0 Attachment
              hehe, yes, I blame BASIC for my lack of understanding of syntax when it
              comes toother languages, all fun and games hu?

              WTG for getting there that quickly, took me days, and way too many web
              pages as I remember it.

              Did you check out their AJAX scripts too? They are worth looking at if ever
              you ever wish to complicate matters further lol.


              2009/11/1 Lorne Russell <lorneokb@...>

              >
              >
              > Well after several exasperating hours I finally figured it out. I had to
              >
              > label my webpage with the extension .php
              > then extract the serial number with <?php $serial=$_GET["serial] ?>
              > then insert the serial number in the textbox with value=<?php echo
              > $serial;?>
              >
              > Lorne
              >
              >
              > ----- Original Message -----
              > From: Lorne Russell
              > To: libertybasic@yahoogroups.com <libertybasic%40yahoogroups.com>
              > Sent: Sunday, November 01, 2009 9:01 AM
              > Subject: Re: Transfer data from LB program to web page text box
              >
              > Well I figured out how to encode the data in the URL by just adding it at
              > the end of the url preceded by a ? for example
              >
              > www.libertbybasic.com?serial=12345-67890<http://www.libertbybasic.com/?serial=12345-67890>
              >
              > Now I need to know how the webpage can extract that data and put it in the
              > textbox for me.
              >
              > Also trying to find a script that forces the user to enter their email
              > address twice and then the web page checks both are identical before
              > processing the form.
              >
              > I'm not very knowledgeable about HTML stuff - any help would be
              > appreciated.
              >
              > Lorne Russell
              >
              > ----- Original Message -----
              > From: Lorne Russell
              > To: Lorne Russell
              > Sent: Sunday, November 01, 2009 7:45 AM
              > Subject: Transfer data from LB program to web page text box
              >
              > Hi:
              >
              > I am trying to set up online registration of my LB products.
              >
              > I would like to transfer a serial number like "12345-67890" from my LB
              > program to a textbox in a web page, so the user will not have to type it in
              > himself. I can open the web page fine using ShellExecuteA.
              >
              > Is there some way to place the serial number in the URL and then have the
              > webpage extract that serial number from the URL and put it in the textbox?
              >
              > Many thanks,
              >
              > Lorne Russell
              >
              > [Non-text portions of this message have been removed]
              >
              >
              >



              --
              Mick (Torpidai)


              [Non-text portions of this message have been removed]
            • zoomkat
              ... LB is not well suited to operate on the server side of a web transaction. Most web servers transact with server CGI programs using stdin and stdout, which
              Message 6 of 7 , Nov 1, 2009
              • 0 Attachment
                --- In libertybasic@yahoogroups.com, "Lorne Russell" <lorneokb@...> wrote:
                >
                > Well after several exasperating hours I finally figured it out. I had to
                >
                > label my webpage with the extension .php
                > then extract the serial number with <?php $serial=$_GET["serial] ?>
                > then insert the serial number in the textbox with value=<?php echo $serial;?>
                >
                > Lorne

                LB is not well suited to operate on the server side of a web transaction. Most web servers transact with server CGI programs using stdin and stdout, which LB isn't well suited. Below is simple FreeBasic code example that when compiled can work with servers like Apache. For test purposes it sends back to the brouser the info that is passed either as a "get" or a "post". Code could be added in to process the info and return the desired result. As to registering software, there has been discussion in the just basic forum on how to register a program to a specific hard drive.



                '' Simple CGI example
                '' - return request back to client

                Dim As String method, request
                Dim As Integer length

                method = Environ("REQUEST_METHOD")

                Select Case Ucase(method)
                Case "HEAD"
                Print "Content-type: text/html"
                Print
                End

                Case "GET"
                request = Environ("QUERY_STRING")

                Case "POST"
                length = Val(Environ("CONTENT_LENGTH"))
                Open cons For Input As #1
                request = Space( length )
                Get #1,,request
                Close #1

                Case Else
                Print "Content-type: text/html"
                Print
                Print "<html><body>Invalid Request</body></html>"
                End

                End Select

                '' send content

                Print "Content-type: text/html"
                Print
                print "<html><body>"
                Print "request:<br>"
                Print "<pre>"
                Print request
                Print "</pre>"
                Print "</body></html>"

                End
              • johnshomeport
                I would use a GUI written in LB to get the information from the user. After the information is entered, including repeated e-mail address, use a modification
                Message 7 of 7 , Nov 2, 2009
                • 0 Attachment
                  I would use a GUI written in LB to get the information from the user.

                  After the information is entered, including repeated e-mail address, use a modification of Brent's PostUrlEncoded demo,
                  http://www.b6sw.com/forum/viewtopic.php?t=109
                  to send the information to the form.

                  John
                Your message has been successfully submitted and would be delivered to recipients shortly.