Page 6 of 10
Re: video#8
Posted: Tue Dec 29, 2009 11:50 am
by Tatti1234
OH YEES!!! Sorry

But now it is working, thanks valhalla ;D
Re: video#8
Posted: Thu Jan 07, 2010 10:58 pm
by zolacat999
where do we get the images from or if we cannot use those one and we create our own where do we place them
Re: video#8
Posted: Sun Jan 17, 2010 6:50 am
by brasilboy109
yea im still confused on divs but they seem realy helpful and like i wished i knew about them sooner. im gonna check out some other resources though
Re: video#8
Posted: Mon Jan 25, 2010 4:44 am
by Zerk
I have a question: Where does the "Include/Include_once" go in a HTML thing...
Example:
Code: Select all
<html>
<head>
include_once here?
</head>
<body>
or here?
</body>
</html>
I've been trying to use normal HTML stuff and putting the PHP in the HTML...
I learned my current PHP knowledge from you and w3schools.com and neither specify where I should put this.

Re: video#8
Posted: Mon Jan 25, 2010 5:01 am
by Jackolantern
As long as it is in the <?php ?> tags, it really doesn't matter (include_once is a PHP function). However, you have to keep in mind that the location of the include_once directive is where the code is added. If you are trying to use the value of a variable, or a function, you need to keep in mind that the include_once function call needs to come in an order that makes sense. Just imagine that you are writing the included file directly into your code.
As far as head vs. body, PHP typically goes in the body. That is because quite often you want the PHP to dynamically create HTML for your page, and the body is the location in an HTML document that contains HTML that will be rendered in the viewer's browser. You can add PHP to the heading, but the reasons for doing so are typically limited.
Re: video#8
Posted: Mon Jan 25, 2010 10:40 pm
by Zerk
Jackolantern wrote:As long as it is in the <?php ?> tags, it really doesn't matter (include_once is a PHP function). However, you have to keep in mind that the location of the include_once directive is where the code is added. If you are trying to use the value of a variable, or a function, you need to keep in mind that the include_once function call needs to come in an order that makes sense. Just imagine that you are writing the included file directly into your code.
As far as head vs. body, PHP typically goes in the body. That is because quite often you want the PHP to dynamically create HTML for your page, and the body is the location in an HTML document that contains HTML that will be rendered in the viewer's browser. You can add PHP to the heading, but the reasons for doing so are typically limited.
Thanks ^^ That helps a lot.
So, from what I gather, you recommend putting ALL PHP in the body section, right?
Even stuff like the connect php thing from the videos?
Code: Select all
<?php
include_once 'connect.php';
session_start();
if(isset($_SESSION['player']))
{
$player=$_SESSION['player'];
}
?>
Re: video#8
Posted: Mon Jan 25, 2010 10:45 pm
by Jackolantern
I have not gone through the video tutorial series yet, so I would just put it where Halls suggests to.
Re: video#8
Posted: Mon Jan 25, 2010 11:06 pm
by Zerk
Jackolantern wrote:I have not gone through the video tutorial series yet, so I would just put it where Halls suggests to.
He isn't using HTML, just putting everything in <?php ?> right now.
Re: video#8
Posted: Mon Jan 25, 2010 11:32 pm
by Jackolantern
Zerk wrote:Jackolantern wrote:I have not gone through the video tutorial series yet, so I would just put it where Halls suggests to.
He isn't using HTML, just putting everything in <?php ?> right now.
Probably is a file begins and ends with <?php ?>, it is meant to be a stand-alone file to be included. Almost all of your scripts will be in the body because they have to do with rendering HTML to the screen. Even if the commands themselves don't, they will likely be used by a function that does. Just assume to put it in the body unless the video states otherwise.
Re: video#8
Posted: Tue Jan 26, 2010 3:08 am
by ZeroComp
All of them are done in php with some HTML or XHTML tags (I forgot is <center> an XHTML>)