Announcement

Collapse
No announcement yet.

How to pass variable for external page?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to pass variable for external page?

    How to pass variable to external page (actiniv V8)?

    #2
    There are probably lots of ways. However it would help if you tell us a little more.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      How to pass variable to external page (actiniv V8) or to mysql database?

      I need to store the data (total value, address, ID and the buyer's name) in a database (mysql).

      When I use in order02 (actinic 8):

      <actinic:block php="true" >
      $ech = '<actinic:variable encoding="perl" name="Total" selectable="false" />';
      $connect = mysql_connect('localhost', 'login', 'pass');
      mysql_select_db ('test');
      $sql = "INSERT INTO valor (payment) VALUES ('$ech')";
      mysql_query($sql);
      mysql_close($connect);
      </actinic:block>

      The result that is recording in the database is:

      NETQUOTEVAR:TOTAL (in one line)
      {£25.83}(in another line).

      {£25.83} is not the total of purchases in the site, it is the total of the example in the preview of the actinic.

      Did you understand my question?
      If you didn't understand I write again!!!

      I am trying to be clear, but my English is very bad. Sorry!!

      THANK YOU FOR HELP!!!

      Comment


        #4
        The

        <actinic:block php="true" >
        .
        .
        .
        </actinic:block>

        code does not run on your server when the customer visits. This code runs on your PC when Actinic is building your HTML pages.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Is there some alternative?

          Then, there is some way of sending these data for another page? or even other alternative to send to the database? one of the two solutions is good for me.

          thx.

          Comment


            #6
            You seem to be wanting to send these from one of the Checkout pages. If so, you'll have to deal with the problem that these pages are generated by Perl scripts.

            What I'd do in that case would be to call a PHP page from within the appropriate checkout phase layout. Something like

            <script type="text/javascript" src="mycode.php?ech=<actinic:variable encoding="perl" name="Total" selectable="false" />"></script>

            where mycode.php is a server-side file containing your code. It will get its value from the query string. It could return a single line of text containing the status of it's operation. E.g.

            echo "var myresult = "success";
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              to send variables for another page:

              excuse me for the delay!

              To send variables for another page:

              <script type="text/javascript" src="http://localhost/mycode.php?ech=<actinic:variable encoding="perl" name="NumericOrderTotal" selectable="false" />&cliente=<Actinic:Variable Name="InvoiceName"/>&ordem=<actinic:variable name="TheOrderNumber" />"></script>

              Work fine!

              Comment

              Working...
              X