PHP and Dreamweaver 4.0

Discussion in 'PHP' started by Nelson B., Apr 4, 2007.

  1. #1
    Hi all, I have had designed a web site using Dreamweaver 4.0, and I would like to add or include some PHP stuff into the web site.
    How can I do that?
    Do I need an special setup or something?
    I have PHP all set, and it is working just fine with Apache server, I just want to know how can I input php code into my web site.
    (Is it just a matter of type the php code into the web site's html code, specifically into the body?)

    Thank you for your help. :)
     
    Nelson B., Apr 4, 2007 IP
  2. datropics

    datropics Peon

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #2
    The first thing you will need to do is rename your files so that they have a .php extension. Then you will need to entire the actual code itself:

    <?
    $msg = 'Hello, thanks for visiting my site!';
    echo "<p>".$msg."</p>";
    ?>
    <p>
    At John Doe Consulting, we pride ourselves in....
    </p>
     
    datropics, Apr 4, 2007 IP
  3. Nelson B.

    Nelson B. Guest

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok, I know more or less how PHP works... so, so far it's just to add the PHP code into my web site, and save the linked PHP files with the .PHP extension and it should work.

    Am I right?

    Thanks for your response !!
     
    Nelson B., Apr 4, 2007 IP