
Browser MMO video #8
Re: video#8
OH YEES!!! Sorry
But now it is working, thanks valhalla ;D

-
- Posts: 62
- Joined: Tue Nov 24, 2009 11:09 pm
Re: video#8
where do we get the images from or if we cannot use those one and we create our own where do we place them
-
- Posts: 7
- Joined: Wed Jan 13, 2010 1:36 am
Re: video#8
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
I have a question: Where does the "Include/Include_once" go in a HTML thing...
Example:
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.

Example:
Code: Select all
<html>
<head>
include_once here?
</head>
<body>
or here?
</body>
</html>
I learned my current PHP knowledge from you and w3schools.com and neither specify where I should put this.

Coding - Unity3d JS, PHP, and small amount of C#.
Art stuff - GIMP, Blender
Art stuff - GIMP, Blender
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: video#8
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.
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.
The indelible lord of tl;dr
Re: video#8
Thanks ^^ That helps a lot.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.
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'];
}
?>
Coding - Unity3d JS, PHP, and small amount of C#.
Art stuff - GIMP, Blender
Art stuff - GIMP, Blender
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: video#8
I have not gone through the video tutorial series yet, so I would just put it where Halls suggests to.
The indelible lord of tl;dr
Re: video#8
He isn't using HTML, just putting everything in <?php ?> right now.Jackolantern wrote:I have not gone through the video tutorial series yet, so I would just put it where Halls suggests to.
Coding - Unity3d JS, PHP, and small amount of C#.
Art stuff - GIMP, Blender
Art stuff - GIMP, Blender
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: video#8
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.Zerk wrote:He isn't using HTML, just putting everything in <?php ?> right now.Jackolantern wrote:I have not gone through the video tutorial series yet, so I would just put it where Halls suggests to.
The indelible lord of tl;dr
Re: video#8
All of them are done in php with some HTML or XHTML tags (I forgot is <center> an XHTML>)
Coding-PHP, Javascript, C++, HTML, mySQL
Modeling/Art-Blender, GIMP
Games-Unity, Game Maker 8
Modeling/Art-Blender, GIMP
Games-Unity, Game Maker 8