WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Add PHP code to HTML table (4 posts)

  1. onasol
    Member
    Posted 11 months 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">
    <tr>
    <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}">
    </form>
    </td>
    <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.
    <br><br>
    <input type="submit" id="btnProtect" name="btnProtect" value="Anmeldung zum Trusted Shops Käuferschutz">
    </form>
    </td>
    </tr>
    </table>

    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,
    Mike

    http://wordpress.org/plugins/woocommerce/

  2. Beren
    Member
    Posted 11 months ago #

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

  3. onasol
    Member
    Posted 11 months ago #

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

    Thanks anyway!

  4. davewatts
    Member
    Posted 1 month ago #

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

    https://www.ejectamenta.com/online-apps/code2html.html

Reply

You must log in to post.

About this Plugin

About this Topic