Announcement

Collapse
No announcement yet.

PHP code in content

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

    PHP code in content

    Hi

    In v8 used to have a little volume calculator which popped up using extended info option and all worked fine simply surrounding the code with
    !!< code >!! and naming the file with a .php extension.

    Upgraded to v9 and doesn't work anymore.

    Have tried surrounding code with <actinic:block php="true"> </actinic:block> but just shows the code and surrouning all that with !!< >!! and shows the form but with no luck.

    Also tried <actinic:block php="true"> </actinic:block>, in line, surrounding <form action="<actinic:block php="true"><?php print $PHP_SHELF; ?></actinic:block> and
    <actinic:block php="true">
    <?php
    if($submit =='Calculate Volume Required' {
    $result =$number1 * $number2 * $number3 / 1000;
    echo '<font size=2 color=white><b>Volume required: $result cubic metres</b></font>';
    }
    ?>
    </actinic:block>
    around the other php code section (that displays the result) but with no luck with the result panel corrupted when displayed and page not found when actioned.

    Can anyone point in right direction?
    regards
    RobiW
    Accessible Website Design
    Search Engine Optimisation & Placement

    #2
    Actinic PHP blockifs are for running PHP at page generation time before uploading. From what you're saying I don't think this is what you're after so drop the blockifs completely.

    Not sure about the solution for !!< >!! not working. Has this come up before?

    Mike
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

    -----------------------------------------

    Comment


      #3
      Originally posted by olderscot View Post
      Actinic PHP blockifs are for running PHP at page generation time before uploading. From what you're saying I don't think this is what you're after so drop the blockifs completely.
      That's what I thought but it was a just another frustrated attempt at a solution.

      Using !!< >!! surrounding the form and php code all worked fine in v8 but now on test server when file is given .php extension when loading page it returns a server misconfiguration 500 error.

      With .html extension the page displays but the php form doesn't work and returns a page not found error due to the php code not being executed in the form action.

      Should !!< >!! work in v9 same as in v8?
      regards
      RobiW
      Accessible Website Design
      Search Engine Optimisation & Placement

      Comment


        #4
        Yes it does, what's the URL to see what you've done?

        Comment


          #5
          Have overcome the problem but not solved the reason it was not working!

          The site had been re-organised with info popups changed to full product pages with checkout facilities etc opening in same window.

          The popup calculator was being included as extended info page details on what is now a full product layout page.

          Changed calc back to a standard popup layout and now works again as before.

          Don't know, have not tested but the checkout code might have been conflicting, in some way, with the calc form code!

          Not perfect solution and not solved but operational again!

          Thanks for help and input.
          regards
          RobiW
          Accessible Website Design
          Search Engine Optimisation & Placement

          Comment

          Working...
          X