How to Add this simple php code in a website form?

Discussion in 'PHP' started by TheSyndicate, Nov 29, 2011.

  1. #1
    I have this php code from a Advert rotator and i need to post in a webform in the WP admin to place it the website. I do not want to do changes in the template i want to use the form. The form is FINE with adsense code and other php code but this code does not work. Do i need to add some filling to it?

    <?php if(function_exists('mba_display_zone')) mba_display_zone(6);?>
    PHP:
     
    TheSyndicate, Nov 29, 2011 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    First make sure that the function mba_display_zone exists.

    Then put that code wherever on which page you want the ad to appear.
     
    Rukbat, Dec 1, 2011 IP
  3. TheSyndicate

    TheSyndicate Prominent Member

    Messages:
    5,410
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    365
    #3
    Yes it does, but that will not answer my question i need the code in a iframt or div or something since i am putting it in a form not inside a php page.
     
    TheSyndicate, Dec 3, 2011 IP
  4. qhm

    qhm Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    There are a few plugins for integrating PHP code to worpdress. You can search google with "php on wordpress" without the quotes.
     
    qhm, Dec 7, 2011 IP
  5. TheSyndicate

    TheSyndicate Prominent Member

    Messages:
    5,410
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    365
    #5
    Thats not the issue here, i already have a plug in and that is causing the problem. I just want to know how to use normal DIV or JAVA code to put this code into a form.
     
    TheSyndicate, Dec 7, 2011 IP
  6. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #6
    
    
    <?php
      echo '<div>';
      if(function_exists('mba_display_zone')) mba_display_zone(6);
      echo '</div>';
    ?>
    
    PHP:
     
    Rukbat, Dec 10, 2011 IP
  7. TheSyndicate

    TheSyndicate Prominent Member

    Messages:
    5,410
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    365
    #7
    Sorry that did not work it just show the code. What does work is like this

    <a href="http://www.woothemes.com/woomember/go?r=55088&i=l43&redirect=mydomain"><img src="http://woothemes.com/ads/468x60b.jpg" /></a>
    PHP:
    or normal adsense code

    I asked the woo theme already but the do not know either.
     
    TheSyndicate, Dec 10, 2011 IP