maXbimmer Forums

maXbimmer Forums (
-   Off-topic (
-   -   Anyone know PHP? (

BlitzSix 02-20-2003 07:37 PM

Anyone know PHP?
Hey, I need some fairly simple help with PHP.
If anyone wants to help me, please post, because I don't really want to type everything up if no one can do it.

Thank you.

///Greco540 02-21-2003 03:49 AM

What seems to be the problem...

BlitzSix 02-21-2003 04:53 PM

It's not really a problem, I just dont know how to do it (I don't know php).

Alright, go to See when you click like News it says the address like this:
So, the news.php file contains JUST the text, but it gets loaded into the grey box part of the layout because of the ?page=news part right.

So, I don't know how to do that. Is it hard?
If it's easy and fast to do, I would appreciate it if you can set it up for me on another site. <-- That's the layout, so if you can set it up like that, and maybe make a separate sample file (just put like FEATURES there or something, so that I can see the format of the file).


BlitzSix 02-21-2003 04:55 PM

Err, there's an error on the page because I tried to do it myself and it didn't work. If it's easier to just delete everything there, just do that and I'll re do the layout

///Greco540 02-21-2003 05:25 PM

Try adding this..

$page = $HTTP_GET_VARS{"page"} . ".php"

Then in the place you want to add the text in just add this..

include $page

///Greco540 02-21-2003 05:27 PM


Originally posted by DarkRider
Err, there's an error on the page because I tried to do it myself and it didn't work. If it's easier to just delete everything there, just do that and I'll re do the layout
You go an error on that page because you added the . at then end of the link. Remove the . and it should work. By adding the . it was trying to load news..php instead of news.php

Hope that helps.

bart320i 02-21-2003 05:28 PM

dude you need to carry more product

BlitzSix 02-22-2003 12:36 AM

Greco: Thanks, I'll try it today.

Bart: Dude thanks for visiting the site but if you read it says it's under construction and it sales to email for any quotes. We sell UUC, iForged for really cheap and we sell lots of other stuff.....just send me an email

Mickroz 02-22-2003 02:04 AM

or try this in the section of the page you want it:
PHP Code:

if ($page == 'news') { include ('news.php');} 

the link should look like this:
PHP Code:

<a href="?page=news">News</a

BlitzSix 02-23-2003 05:19 AM

Okay, I have proven to myself that I can't do anything in PHP. I put that stuff in but I have NO CLUE how to set up the rest of the stuff.....

Like, on there is the header file (for the top) a footer file, and stuff.

So, is there any way that any of you can set up that PS layout (you can change it if you want, doesnt really matter) so that the right side, the left side, the top, the bottom are all loaded from different files (I think its already like that) AND so that I can link to them that way where the source file only has the text and it gets loaded into the layout. Also, do a couple of example links to just some "TEST" files so I can just C & P and edit them :).

I don't have a lot of $, but if anyone is willing to do this, I can paypal you $5 or something.


PS. If you do it, just attach it or email it to

BlitzSix 02-23-2003 05:21 AM

I just basically want it to be easily changed because I WILL for sure change the layout in the near future and I don't want to have to re do every single page.

So, just the layout getting loaded from different files and the linking to just the text thing is all I need.

THANK YOU people.

PS. If you want to see what any file on the UP site looks like let me know and I'll send it.

BlitzSix 02-24-2003 12:16 AM

Please ???

rhythm 02-25-2003 03:33 AM

include 'header.php';

$section = $_GET["section"];
$ext = ".php";
$middle = "$section$ext";

include $middle;

include 'footer.php';

Mickroz 02-25-2003 10:33 PM

ok,this what i think the easiest way to do it,you have to place your site in a table,this will be your index.php, like this :
PHP Code:

    <title>Performance Scene</title>
    <meta name="Title" content="Performance Scene - [url][/url]">
    <meta name="Description" content="A site for the performance car enthusiast">
    <meta name="Keywords" content="performance cars, street racing, fast cars, modified cars, car modification, car parts, car forums, bmw, toyota, mitsubishi, honda, volkswagen, vw">
    <link rel="stylesheet" type="text/css" href="layout.php">
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#666666">



now you have to make 6 pages.

page 1: layout.php ,this will be your text/css style,put everything you want in here from linkstext color to scrollbar color.

page 2: header.php ,this wil be the top of your page,in your case from the topnews part in grey to the forum part in grey.

page 3: links.php ,here you put in the left grey box of your site in,and make the links look like this:

PHP Code:

<a href="?page=home">Home</a

we will come to that later.

page 4: body.php ,this wil be the first page in the center you want your visitors see first,in your case your latest news.
in your index page as above,you have to put this directly under the include("body.php");
PHP Code:

if ($page == '') { include ('body.php');} 
if (
$page == 'home') { include ('body.php');} 

now if you click the home link in your links page,your body page will load in the center of your page.

page 5: rightmenu.php ,this wil be the right grey box menu on your site.

page 6: footer.php ,this will be pagetop contact us bar of your site.

Mickroz 02-25-2003 10:43 PM

now every link should look like this in your links page:
PHP Code:

<a href="?page=contact">Contact us</a

then you have to put this in your index directly under the last link,for now under this part:
PHP Code:

if ($page == '') { include ('body.php');} 
if (
$page == 'home') { include ('body.php');} 

should come this:
PHP Code:

if ($page == 'contact') { include ('contact.php');} 

you have to do every link like that.

All times are GMT -4. The time now is 04:07 PM.

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Maxbimmer Copyright 2001 - 2018