Htlm site then add php?

Discussion in 'PHP' started by lafours, Apr 24, 2007.

  1. #1
    Hi Guys

    Am I right in thinking that I can design a site in HTML then just add php code to specific parts for it to carry out the desired action? :confused:

    Lafours
     
    lafours, Apr 24, 2007 IP
  2. 007

    007 Well-Known Member

    Messages:
    328
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Yes. That is one of the easier ways to get a PHP site going.

    Another way is to add the HTML into the PHP but it's usually easier if you have a design in mind already. :)
     
    007, Apr 24, 2007 IP
  3. ottodo

    ottodo Guest

    Messages:
    2,055
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yes you can :)
    otherwise you can add html code to php page :)
     
    ottodo, Apr 24, 2007 IP
  4. Chamaro Zwinkels

    Chamaro Zwinkels Peon

    Messages:
    44
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    That's better ;)
    Because php doesn't work in a .html of .htm file. Html dóes work in a .php file...:)
     
    Chamaro Zwinkels, Apr 24, 2007 IP
  5. lafours

    lafours Well-Known Member

    Messages:
    1,331
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    130
    #5
    Wow! Thanks for the fast response!

    Forgive my ignorance but would it just be a matter of designing pages in dreamweaver with a .php ext but using html?
     
    lafours, Apr 24, 2007 IP
  6. Chamaro Zwinkels

    Chamaro Zwinkels Peon

    Messages:
    44
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    When you don't use php, you can make your file with ext .html, with php the ext .php
     
    Chamaro Zwinkels, Apr 24, 2007 IP
  7. JScripting

    JScripting Active Member

    Messages:
    129
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #7
    yeah you can have html in any php file, php wont work in html though
     
    JScripting, Apr 24, 2007 IP
  8. PHPGator

    PHPGator Banned

    Messages:
    4,437
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    260
    #8
    I always use this process:

    1: Create design in photoshop
    2: Slice/develop HTML/CSS
    3: Change extention to PHP and begin pulling data from the MySQL database.
     
    PHPGator, Apr 24, 2007 IP
  9. lafours

    lafours Well-Known Member

    Messages:
    1,331
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    130
    #9
    Thanks very much for your help. This is a big undertaking for me and you have all been very helpful. :)
     
    lafours, Apr 25, 2007 IP
  10. cakker

    cakker Well-Known Member

    Messages:
    165
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    140
    Digital Goods:
    1
    #10
    hi,
    you can have php code in your html also, but you need to modify your webserver configuration.
    krisztian
     
    cakker, Apr 25, 2007 IP
  11. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #11
    
    <html>
    <head>
    <title><?php echo "This is the page title"; ?></title>
    </head>
    <body>
    1+2 = <?php echo (1+2); ?>
    </body>
    </html>
    
    PHP:
     
    MMJ, Apr 25, 2007 IP
  12. pulikuttann

    pulikuttann Banned

    Messages:
    1,839
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #12
    What u exactly wan to do ??
     
    pulikuttann, Apr 26, 2007 IP