Results 1 to 8 of 8

Thread: How do i Cre8 a php page?

  1. #1
    Join Date
    Feb 2005
    Posts
    12

    Default How do i Cre8 a php page?

    i learned php out of a book and there it taught me to place a php tag inside a html page
    like:
    Code:
    <html>
    <body>
    <?php 
    echo "something";
    echo "another something";
    ?>
    </body>
    </html>
    my question is- what do i need to do to make it a .php insted of .html?
    leave it like this ? or change any thing?

    Roy

  2. #2
    Join Date
    Jan 2005
    Posts
    172

    Default

    hmmm...
    I'm not sure that's the right way.
    U don't need an html tag in php page, except some times, and when u do, u need to put "echo" before html tags. Php codes don't need "echo" before the code.
    To save it as .php, just open the page in NotePad and the the files as filename.php, instead of filename.html

    I hope this helps, although there might be other ways of doing it....

  3. #3
    Join Date
    Jan 2005
    Posts
    16

    Default

    The code is correct. What you need to do is change the Windows folder settings to display known file extensions and then rename the .html part of the name to .php. You can change the settings by opening My Computer, going to Tools then Folder Options, going to the view tab and then unchecking 'Hide extensions for known file types'. Hope this helps.

  4. #4
    Join Date
    Feb 2005
    Posts
    12

    Default

    aerialfreeviewforumb thx , all i needed to hear was "The code is correct"
    i knew how to change Extentions, but thx for ur howto;)

    SpyJoe
    i didnt rlly got what u said... can u post a syntex of what you think is php code?
    thx alot

  5. #5
    Join Date
    Jan 2005
    Posts
    172

    Default

    SpyJoe
    i didnt rlly got what u said... can u post a syntex of what you think is php code?
    thx alot
    Sorry, I'm not english, so my english is not so good, and I don't know what is sentex, I looked in the dictionary and there's no such word there. But if it means definition, then php code is a programming language, just like html and java. Is that what u want to know?

  6. #6
    Join Date
    Feb 2005
    Posts
    12

    Default

    a code of php
    can u port a php code
    like i did:

    "<html>
    <body>
    <?php
    echo "something";
    echo "another something";
    ?>
    </body>
    </html>
    /"

  7. #7
    Join Date
    Jan 2005
    Posts
    172

    Default

    I guess u can, but I don't use html tags in php...
    My code starts with <?php and not with <html>....

  8. #8
    Join Date
    Feb 2005
    Posts
    12

    Default

    oh...ur code is only the php tag
    ok
    thx;)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •