[resolved] Add PHP code to HTML table (4 posts)

  1. onasol
    Posted 2 years ago #

    Hello… does anybody know how to include a PHP code into a HTML table?

    Here is the html table:

    <table width=400 border="0" cellspacing="0" cellpadding="4">
    <td width="90">
    <form name="formSiegel" method="post" action="https://www.trustedshops.com/shop/certificate.php" target="_blank">
    <input type="image" border="0" src="{pfad/zum/siegel.png}" title="TrustedShops Gütesiegel - Bitte hier Gültigkeit prüfen!">
    <input name="shop_id" type="hidden" value="{value shop id}">
    <td align="justify">
    <form id="formTShops" name="formTShops" method="post" action="https://www.trustedshops.com/shop/protection.php" target="_blank">
    <input name="_charset_" type="hidden" value="">
    <input name="shop_id" type="hidden" value="{value shop id}">
    <input name="email" type="hidden" value="{value email}">
    <input name="amount" type="hidden" value="{value amount}">
    <input name="curr" type="hidden" value="EUR">
    <input name="paymentType" type="hidden" value="{value paymentType}">
    <input name="kdnr" type="hidden" value="{value kdnr}">
    <input name="ordernr" type="hidden" value="{value ordernr}">
    Als zusätzlichen Service bieten wir Ihnen den Trusted Shops Käuferschutz an. Wir übernehmen alle Kosten dieser Garantie, Sie müssen sich lediglich anmelden.
    <input type="submit" id="btnProtect" name="btnProtect" value="Anmeldung zum Trusted Shops Käuferschutz">

    I want to replace the three values {value email}, {value amount} and {value ordernr} of the html table with the following three PHP lines (WooCommerce methods):

    <?php echo $order->billing_email ?>
    <?php echo $order->order_total ?>
    <?php echo $order->id ?>

    What is the right way to do this? Just copy and paste the php lines into the html table?

    Best regards,


  2. Beren
    Posted 2 years ago #

    There's a bunch of plugins that do things like this. For example: http://wordpress.org/plugins/wp-exec-php/

  3. onasol
    Posted 2 years ago #

    I have heard of these plugins but I was looking for something else. The topic is now resolved.

    Thanks anyway!

  4. davewatts
    Posted 2 years ago #

    I have a webpage with a tool for formatting code as valid html for websites, maybe it can help you


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic