Forum index / General Chat / Tell HGF Things

Tell HGF Things

47,061 posts · page 910 of 1,569

post #27,271
06 March 2008, 20:48 UTC#27,271
QUOTE(mono @ Mar 6 2008, 09:38 PM) [snapback]471828[/snapback]
I know no one will reply but I need help with simple PHP include navigation for a site. matt said something about if/else statements but it's confusing the fuck outta me.

$


QUOTE
<?php include 'FILENAME.php';?>


That kinda thing or something more?
post #27,272
06 March 2008, 20:56 UTC#27,272
yeah I got the content showing up on the first page using that, but I need to get the nav links to show pages in the content area (like how you'd have target="frame" in a html iframe).
post #27,273
06 March 2008, 21:05 UTC#27,273
I gotta turn the server on and I'll let you know cos I have a webpage on there that does just what your after and I'll send you the code your needing. lol :-)

EDIT:
I'll be back in about 5 with the info, bloody servers going all weird on me. lol
post #27,274
06 March 2008, 21:48 UTC#27,274
Yay new Futurama March 23rd!
post #27,275
06 March 2008, 21:50 UTC#27,275
QUOTE(BLL_Geaslin @ Mar 6 2008, 10:48 PM) [snapback]471849[/snapback]

Yay new Futurama March 23rd!

Fucking right; new South Park as well. It's like a tag-team of goodness.
post #27,276
06 March 2008, 21:51 UTC#27,276
Indeed...Comedy Central is the greatest channel known to man
post #27,277
06 March 2008, 22:02 UTC#27,277
Awesome I hope futurama comes back to be pretty funny, and South park is gonna be awesome too, can't wait.
post #27,278
06 March 2008, 22:17 UTC#27,278
QUOTE(Fuzzy Mannerz @ Mar 6 2008, 10:05 PM) [snapback]471837[/snapback]

I gotta turn the server on and I'll let you know cos I have a webpage on there that does just what your after and I'll send you the code your needing. lol :-)

EDIT:
I'll be back in about 5 with the info, bloody servers going all weird on me. lol

sick dude, cheers.
post #27,279
06 March 2008, 22:25 UTC#27,279
Looks like I'm getting another snow day tomorrow. :)
post #27,280
06 March 2008, 22:32 UTC#27,280
Sorry about the IP ban Mike, I figured that was your chicks IP.
post #27,281
06 March 2008, 22:34 UTC#27,281
huh?
post #27,282
06 March 2008, 22:40 UTC#27,282
I IP banned "Big Mike" by accident earlier.
post #27,283
06 March 2008, 23:05 UTC#27,283
QUOTE(mono @ Mar 6 2008, 11:17 PM) [snapback]471857[/snapback]

QUOTE(Fuzzy Mannerz @ Mar 6 2008, 10:05 PM) [snapback]471837[/snapback]

I gotta turn the server on and I'll let you know cos I have a webpage on there that does just what your after and I'll send you the code your needing. lol :-)

EDIT:
I'll be back in about 5 with the info, bloody servers going all weird on me. lol

sick dude, cheers.


Right I got the code, heres what you need to do....

1. Change the PHP Include code you already have to this:
CODE

<?php
$page = $_GET['page'];

if (! file_exists("$page.php"))
{
include("YOUR-FIRST-PAGE-THAT-WILL-BE-DISPLAYED.php");
}
else
{
include("$page.php");
}
?>


2. All links that you want to open in that space will need to be used like so....
CODE
index.php?page=PAGENAME

"PAGENAME" is the name of the .php page that you want to open in the space where the "YOUR-FIRST-PAGE-THAT-WILL-BE-DISPLAYED.php" is by default.

So for example:

I have the following files that will be linked seperatly to open in the center of my page:
about.php and contact.php

I will make a link on the nav that will look like: "About Me" it will link to "index.php?page=about"
There is also contact.php that I want to open in that space and that will link to "index.php?page=contact"

they will bring up "contact.php" and "about.php" instead of my default page, which in my case is "welcome.php"

EDIT: Forgot to mention if the page is in another directory it would be like so.. "index.php?page=DIRECTORY/PAGENAME" (with no .php at the end just like the others)

Im presuming this is the first page therefore "index.php" but if its something else just change the "index" to the name of the page you currently have.

Let me know how you get on and feel free to ask for any help.

Hope this helps. Image file not present in the recovered backup
post #27,284
06 March 2008, 23:13 UTC#27,284
QUOTE(made @ Mar 6 2008, 06:32 PM) [snapback]471859[/snapback]

Sorry about the IP ban Mike, I figured that was your chicks IP.





Sorry, his IP, my comp. :sad:
post #27,285
06 March 2008, 23:19 UTC#27,285
QUOTE(Mr. Brown @ Mar 6 2008, 05:25 PM) [snapback]471858[/snapback]

Looks like I'm getting another snow day tomorrow. :)



amazing arent they, had about 3 in the past two weeks, and 2 years ago had one in may lol ohh snow days are the best days
post #27,286
07 March 2008, 00:01 UTC#27,286
QUOTE(Big Mike @ Mar 6 2008, 05:48 PM) [snapback]471784[/snapback]

Yates....your avatar is amazing.

<3

haha spunkbubble.

also I got mad violent tonight and punched some motherfucker for pulling what little hair I have. motherfucker I'm trying to keep it, it might not grow back.
post #27,287
07 March 2008, 03:42 UTC#27,287
QUOTE(Sla-Vin @ Mar 7 2008, 12:19 AM) [snapback]471867[/snapback]

QUOTE(Mr. Brown @ Mar 6 2008, 05:25 PM) [snapback]471858[/snapback]

Looks like I'm getting another snow day tomorrow. :)



amazing arent they, had about 3 in the past two weeks, and 2 years ago had one in may lol ohh snow days are the best days


Yeah, the fact that it rarely snows here makes them so much better. Up in your parts you guys are prepared but when snow hits here it's like some pleasant pandemic.
post #27,288
07 March 2008, 03:44 UTC#27,288
do yalls run around when 3 snowflakes hit the ground, searching for propane to hit up everything?? like in that one episode of king of the hill?? I so bet its like that
post #27,289
07 March 2008, 03:52 UTC#27,289
Not quite that bad. Just 90% of the people instantly shit themselves when the first flakes fall.
post #27,290
07 March 2008, 03:59 UTC#27,290
Ha...Today at the local grocery store...people were stockpiling up on the food and shit...it was like they were preparing for a damn ice age.
post #27,291
07 March 2008, 04:33 UTC#27,291
it was gay at first but it turned out pretty good at the end we made out with a couple of random chicks






you know, someone sould coppy and paste this topic and get this topic published.. many many stories and feudes went down in the topic
post #27,292
07 March 2008, 06:41 UTC#27,292
I has msn\\

[email address redacted]

add me!
post #27,293
07 March 2008, 06:45 UTC#27,293
George Carlin......is amazing.
post #27,294
07 March 2008, 08:51 UTC#27,294
yes. he is. tell me you havn't just seen him perform or something. I may have to come and scoop your eyeballs out and keep them fresh.
post #27,296
07 March 2008, 10:58 UTC#27,296
QUOTE(Davey Rotten @ Mar 7 2008, 07:41 AM) [snapback]471954[/snapback]

I has msn\\

[email address redacted]

add me!

Done.

Image file not present in the recovered backup
post #27,298
07 March 2008, 11:38 UTC#27,298
what a fucking retard^

I come to the forums to check out the latest and greatest but all I see is retarded posts by this homo.
post #27,299
07 March 2008, 11:53 UTC#27,299
QUOTE(j0nes @ Mar 7 2008, 10:38 PM) [snapback]472029[/snapback]

what a fucking retard^

I come to the forums to check out the latest and greatest but all I see is retarded posts by this homo.


Seconded.

I think one of our friendly admins should put him on the fag team.
post #27,300
07 March 2008, 11:55 UTC#27,300
Right guys ive spoke to 2 admins and both have said im posting stupid comments , I understand now and will stop doing this short assed things. Dan