HTML file a reference to the PHP file

Discussion in 'PHP' started by Philosophaie, Feb 10, 2012.

  1. #1
    Where and How do you place the PHP file? I think you need to place into you HTML file a reference to that PHP file. Can you put it directly into your html code:

    <?php
    
    code
    
    ?>
    Code (markup):
    but where and what quantifiers?

    Or put a reference of the above code to a .php file but where does it go and what is the syntax?

    I would need to put to execute as the last operation of a button onclick if possible:

     <input type="button"  name="name1" value="Calculate" onclick="javascriptcalc()" />
    Code (markup):
     
    Philosophaie, Feb 10, 2012 IP
  2. GMF

    GMF Well-Known Member

    Messages:
    855
    Likes Received:
    113
    Best Answers:
    19
    Trophy Points:
    145
    #2
    Care to learn the basics? Here, have a nice 15 part PHP tutorial, should teach you what you need.

    devzone.zend.com/6/php-101-php-for-the-absolute-beginner/
    Code (markup):
     
    GMF, Feb 10, 2012 IP