Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Newbie question

  1. #1
    cuz
    cuz is offline
    New Coder
    Join Date
    Mar 2003
    Location
    New Chursey
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Newbie question

    Hello, all. I've been wanting to learn PHP and I just picked up a PHP book today to help me. I've been thumbing through the book and noticed that a lot of the code is within the <HEAD> tags of the webpage. Is it possible (like with JavaScript and CSS) to create an external PHP file and link to an HTML page usink <link rel...>? I searched the board before posting and couldn't find an anser.

    Thanx in advance,
    -cUz

  • #2
    Regular Coder
    Join Date
    Oct 2002
    Location
    Milwaukee, Wisconsin
    Posts
    123
    Thanks
    1
    Thanked 0 Times in 0 Posts
    yup kinda i think what you mean is to include an external file from a page right???
    stick this into the body tags of your code
    Code:
    <?php include('INCLUDED FILES URL'); ?>
    hope that helps

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts


    My first piece of advice would be to don't ever look at that book again. lol

    PHP code placement isn't restricted to any particular place in the page.

    I would start looking at the PHP manual:

    http://www.php.net/manual/en/tutorial.php

    then move on to:

    http://www.zend.com/

    for tips, tutorials, samples, etc.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    cuz
    cuz is offline
    New Coder
    Join Date
    Mar 2003
    Location
    New Chursey
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Excellent! Good to know that all that code won't crowd the page.

    I also checked out the PHP manual.

    Thanx for the help guys...
    -cUz

  • #5
    Regular Coder
    Join Date
    Oct 2002
    Location
    Milwaukee, Wisconsin
    Posts
    123
    Thanks
    1
    Thanked 0 Times in 0 Posts
    lol yea exactl;y books are oaky i find when i buy one inever actually read it i just like to fiddle around with the free cd software inside.. hey you cant blamne a 14 year old eh lol but yea its still a good idea though to go with what the pros say cause usually its right

  • #6
    New Coder
    Join Date
    Mar 2003
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I still have my PHP book... opened it once and never opened it again... www.php.net is so much better... and searchable...


  •  

    Posting Permissions

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