PDA

View Full Version : PHP Burns, i have a coding problem.



Tratos
20-01-05, 20:16
im trying to use PHP Include on my website and its being quite painful as i cant get it to work in conjunction with my layout which after some help and inspiration ended up looking like this (http://www.broken-reality.org/misc/br_layout2.2.gif) as you see if you look at the site by clicking here (broken-reality.org) theres a huge gaping hole in the middle of the layout (the blue bg is there so the text is visable) now i tried to add the piece of layout removed for the code to the called page but it fills the entire page bg including areas outside of the 'hole' so was i right to remove the middle section to add the code or should i have used something to the effect of a text box to display the called pages into?

if theres any code monkehs out there please help me i r a nib and im stuck heh.

Lexx i know you <3 teh php i hope your on the board today :p lol

Thanks in advance

Lexxuk
20-01-05, 20:27
Looks ok to me, cant see any gaps.


<? php

include 'file.txt';

?>

or file.php html shtml jsp asp vrml arghhh

Tratos
20-01-05, 20:34
Looks ok to me, cant see any gaps.


<? php

include 'file.txt';

?>

or file.php html shtml jsp asp vrml arghhh You aint seeing the page like this? (http://www.broken-reality.org/misc/br_error.JPG) as the area with text on should match the rest of the layout (dark blue, scan lines and such)

Lexxuk
20-01-05, 20:45
Looking at the source code, first thing that pops up...


<head>
<title>Broken-Reality.org | In Development i.e. Broken</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
..................

<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Broken Reality</title>
</head>

you have two <head> and two <body>

In the include file, just put text and formatting, no other things like <head> <meta> etc.. as these will all be part of the file that calls the include

Tratos
20-01-05, 20:56
Ive now removed the head and stuff from the called page (just the main one for now) any ideas on how to make my layout image complete?

Lexxuk
20-01-05, 21:00
You have two <body> tags still :p

http://validator.w3.org/check?uri=http%3A%2F%2Fbroken-reality.org%2Findex.php

you also have two </html> tags

Tratos
20-01-05, 21:01
You have two <body> tags still :p

http://validator.w3.org/check?uri=http%3A%2F%2Fbroken-reality.org%2Findex.php

you also have two </html> tags so basicly for the included (or called) page i just need whats going to be on the page? just plain text?

EDIT: i just have plain text (well no tags i think, lol) on this page http://www.broken-reality.org/broken.php?br=main2 but the bg problem is still occuring.

Lexxuk
20-01-05, 21:14
That one still has multiple heads and stuff = bad :p

What you want to do, is use a style sheet to define the styles, one could be called .background and have /images/br_layout2_19.jpg repeating itself along the y axis, so its 19 19 19 19.

When you call the file from the include, the files format takes over for that bit, so if there is no formatting on the included file, there will be no formatting, so use a style sheet to define the style and apply it to the included file.

Tratos
20-01-05, 21:16
That one still has multiple heads and stuff = bad :p

What you want to do, is use a style sheet to define the styles, one could be called .background and have /images/br_layout2_19.jpg repeating itself along the y axis, so its 19 19 19 19.

When you call the file from the include, the files format takes over for that bit, so if there is no formatting on the included file, there will be no formatting, so use a style sheet to define the style and apply it to the included file. Crush Kill Destroy.

I hate coding, lol thing is i have no clue on what you just said, lol but im going to now nuke the fucking code of multiple heads and such.

i THINK ive solved the tags thing, lol if you find some please identify them if youd be so kind.

Lexxuk
20-01-05, 22:04
Try...

<td background="../images/br_layout2_19.jpg"> text here </td>

Tratos
20-01-05, 22:40
Try...

<td background="../images/br_layout2_19.jpg"> text here </td>
www.broken-reality.org

got it working now with a bg but i dont know how ive managed to knock image 22 to where it is O_o

Lexxuk
20-01-05, 22:57
just delete 22, see what happens :p

Tratos
20-01-05, 23:05
just delete 22, see what happens :p
ive managed to get it back where it should be now :p but the bloody table sizes are being wankers.

Lexxuk
20-01-05, 23:32
I hate tables, never use em, I use Layers in dreamweaver, but I'm learning Java at the moment, then I'll get down to hard core perl and php and stuff after that :D

Tratos
20-01-05, 23:37
I hate tables, never use em, I use Layers in dreamweaver, but I'm learning Java at the moment, then I'll get down to hard core perl and php and stuff after that :D
layers in dreamweaver ay?

i use frontpage although it is pretty much a huge sin im used to it but i fear i may have to get myself into DW as tables piss me the fuck off, lol

Lexxuk
20-01-05, 23:44
Be a real man!!

http://www.ultraedit.com !!11
http://www.w3schools.com !!111oneone

retr0n
20-01-05, 23:55
Be a real man!!

http://www.ultraedit.com !!11
http://www.w3schools.com !!111oneone


Pffft, Notepad owns!

Tratos
21-01-05, 00:30
i use photoshop as i know very little HTML or PHP or anything so i do some design stuff in design view and then do simpler bits in the html view so its gradually helping me learn :)

Anyway thanks Lexx youve been a big help! :D i probably will have to rebuild the damn site like but still, lol

sex teh lexx

Lexxuk
21-01-05, 01:13
Pffft, Notepad owns!

pfft, copy con filename.htm

do it like a real man :p

hinch
21-01-05, 03:30
lexx uses the TM method of "ask hinch" he never does coding him selfs just copies from msn from me :)

Xeno LARD
21-01-05, 12:51
Try to avoid using tables. I'll take a proper look at it later if i'm really bored.

retr0n
21-01-05, 14:12
Try to avoid using tables. I'll take a proper look at it later if i'm really bored.


Tables are still cool, and should be used, but dont make them to complex, like
4 layers of tables (tables in tables in tables... etc) because then things get out
of hand, and it will look a whole lot different in different browsers.

What you might want to do is separate (sp?) the top area (logo+menu), the
content area (the text) and the bottom area in 3 different frames.

Tables should only be used to print out data & stuff really. No other use for them.

Lexxuk
21-01-05, 15:28
lexx uses the TM method of "ask hinch" he never does coding him selfs just copies from msn from me :)

meh that was coz I was usin x=x+1 instead of x++ :p

Tratos
21-01-05, 17:47
Well im basicly using tables as, well photoshop saved it in them after i sliced it, lol but i did add that to a table O_o and i think more tables ended up in there, time to rebuild, lol

Xeno LARD
21-01-05, 17:56
Tables are still cool, and should be used, but dont make them to complex, like
4 layers of tables (tables in tables in tables... etc) because then things get out
of hand, and it will look a whole lot different in different browsers.

What you might want to do is separate (sp?) the top area (logo+menu), the
content area (the text) and the bottom area in 3 different frames.

Tables should only be used to print out data & stuff really. No other use for them.

Tables are good for what they're ment to do - Show information in a nice table like way.

For layout's they're shit.

[Edit: Frames? Tell me you're joking, please.]

retr0n
21-01-05, 18:31
Tables are good for what they're ment to do - Show information in a nice table like way.

For layout's they're shit.

Yeah, that's what I meant... Just couldnt find the words...



[Edit: Frames? Tell me you're joking, please.]


Plz explain...

Tratos
21-01-05, 21:35
ALIVE I TELL YOU!

Well, didnt need to rebuild just twated some images with photshop and nuked some tables and it now works :D www.broken-reality.org actualy has a website attached to it, lol

Cheers much to helpage peoples :D

Xeno LARD
22-01-05, 02:59
ALIVE I TELL YOU!

Well, didnt need to rebuild just twated some images with photshop and nuked some tables and it now works :D www.broken-reality.org actualy has a website attached to it, lol

Cheers much to helpage peoples :D

Looks nice, the bg image needs to be 1px taller/shorter at the top I think, It kind of isn't right.


Plz explain...

Frames are horrible, crap for accessibility, hard for search engines to get good results with (Accessibility I know, but still), shit on older browser (thinks links/lynx).

There's no reason to use frames. All the big/well designed sites don't use frames.

Tratos
22-01-05, 15:45
Looks nice, the bg image needs to be 1px taller/shorter at the top I think, It kind of isn't right.
Its to do with the BG flowing into the actual image i think. i'll try and change it when i have some content up.