PHP Placement along with HTML Tags?

Discussion in 'PHP' started by cpufreak3, Mar 3, 2008.

  1. #1
    I'm trying to implement a user registration/login script in PHP.

    For example, if you take a look at the site: http://www.roscripts.com/PHP_login_script-143.html

    The code I have is completely in PHP.

    My question is, where do I put it relative to my HTML tags (mainly, the title for SEO)? Or should I be doing it differently?

    Since the PHP script I have has a redirect (header), I'm pretty sure it has to be before the <body>, but what about the <head> and <html>.

    This may be an easy question, so I simply ask, where do I place my HTML tags relative to my PHP script?

    Thanks in advance.
     
    cpufreak3, Mar 3, 2008 IP
  2. quicksolutions

    quicksolutions Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can put php code anywhere in HTML with in <?php ?>
    For Example:

    <html>
    <head>
    <title>
    <?php
    echo "test Title";
    /// your code
    ?>
    </title>
    </head>
    <body>
    </body>
    </html>
     
    quicksolutions, Mar 3, 2008 IP