Announcement

Collapse
No announcement yet.

Using a variable in a separete php file.

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

    Using a variable in a separete php file.

    The mailform.pl uses actinic variables in the file content. I have a stand alone php mail handler file in the Site folder, how can I use a variable in the php code? Or must the php be within a page in SD?

    Here is the start of my php file:
    PHP Code:
    <?php session_start();
    //$my_email = "hello@graphicz.solutions";
    $my_email "<actinic:variable name='Email'/>";
    $from_email "noreply@graphicz.solutions";
    $subject "Enquiry from <actinic:variable name='CompanyName' /> Website";
    $Securimage_CAPTCHA 1;
    include_once 
    dirname(__FILE__) . '/securimage/securimage.php';
    $securimage = new Securimage();

    etc etc etc etc
    Thanks
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    Stuff like <actinic:variable name='CompanyName' /> will only work in SellerDeck layouts or in the source SellerDeck .pm and .pl files. They will not work in standalone .php files that you upload to your server.

    You could pass the SD stuff as parameters to your .php file; assuming the below is in an SD layout::
    Code:
    <a href="mycustomcode.php?cname=<actinic:variable name='CompanyName' />&email=<actinic:variable name='Email'/>">CLICK ME</a>
    P.S. you may need to do some encoding of the variables if they aren't purely alphanumeric.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thank you Norman.
      Jonathan Chappell
      Website Designer
      SellerDeck Website Designer
      Actinic to SellerDeck upgrades
      Graphicz Limited - www.graphicz.co.uk

      Comment

      Working...
      X