home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Table Background through PHP echo

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2477
Discussions: 200,961, Posts: 2,379,562, Members: 246,330
Old June 8th, 2003, 07:24 PM   Digg it!   #1 (permalink)
Member
 
aarmenaa's Avatar
 
Join Date: Jan 2003
Location: Atlanta, GA, USA
Posts: 79
Send a message via ICQ to aarmenaa Send a message via AIM to aarmenaa Send a message via Yahoo to aarmenaa
Table Background through PHP echo

I'm trying to create a table, and it has a background image. The table and it's contents displays fine, but the background image isn't present. I get no errors, just no picture. Is it not possible to have a table work this way in PHP? I have included my code below. I'm making a theme for PHP-Nuke, but I'm a complete noob at PHP, so I'm looking lots of tutorials. Everything I read says it should be fine with any HTML I write.

-Aarmenaa

PHP file:
$tmpl_file = "themes/BinaryToast/header.htm";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;

header.htm (called by PHP above):
<table width="100%" height="122" border="0" cellpadding="0" cellspacing="0" background="http://www.binarytoast.com/themes/BinaryToast/images/extender.gif" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td><img src="http://www.binarytoast.com/themes/BinaryToast/images/logo.gif" width="782" height="122" border="0" usemap="#topbar"></td>
</tr>
</table>

<map name="topbar">
<area shape="rect" coords="146,103,203,120" href="http://www.binarytoast.com/index.php">
<area shape="rect" coords="221,103,304,120" href="http://www.binarytoast.com/modules.php?name=Search">
<area shape="rect" coords="324,103,424,120" href="http://www.binarytoast.com/modules.php?name=News&file=categories&op=newindex& catid=2">
<area shape="rect" coords="443,103,532,120" href="http://www.binarytoast.com/modules.php?name=News&file=categories&op=newindex& catid=1">
<area shape="rect" coords="549,103,620,120" href="http://www.binarytoast.com/modules.php?name=Forums">
<area shape="rect" coords="638,103,736,120" href="http://www.binarytoast.com/modules.php?name=Your_Account">
</map>

<br>

Here's how it's supposed to work: There's a banner that's just a standard image in the table (logo.gif). In order to make the banner extend to the edge of any size browser, I took the last colum of pixels and made the extend.gif picture a background image. If I run the HTML on my computer, it looks fine, but the part about the background image is ignored when it's run through the PHP.

It's supposed to look like this

Last edited by aarmenaa : June 8th, 2003 at 07:28 PM.
aarmenaa is offline   Reply With Quote
Old June 9th, 2003, 03:00 PM     #2 (permalink)
Member
 
gothic's Avatar
 
Join Date: Oct 2001
Location: Palatine, IL
Posts: 375
I copy/pasted your code and dumped it onto my server and it worked perfectly (I assume anyway).

It displayed a blank page, with a 'Binary Toast' logo ontop which is an imagemap.

If I load header.htm without parsing it through the php script, it looks exactly the same.

I'm on Apache 2.0.46/Unix with PHP 4.3.1..
gothic is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2980)
The disrespect of Obama by Russian .. (46)
Making Health Care Worse (181)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
windows 7 problem (7)
Laptop with wireless problem. (5)
windows vista security holes (13)
Is the PSU I received dead? (13)
Print spooler problem (16)
Point and Shoot Camera Suggestions. (5)
radeon x850xt platinum & shader.. (6)
HIS HD5770 graphic card question (15)
Recent Discussions
CPU fan stops spinning randomly (11)
Nvidia GTX 260 problem (1)
Modern Warfare 2: Who Bought It? (65)
Point and Shoot Camera Suggestions. (5)
Is the PSU I received dead? (13)
Print spooler problem (16)
windows vista security holes (13)
Kingston Bluetooth Dongle Driver (1)
Multiple Restarts Required at Boot (3)
Open With ..... Win7 (1)
webcam (0)
upgrade for hp a6101 (0)
Laptop with wireless problem. (5)
tv not turn on-makes clicking sound (2)
EVGA 9800 gtx help with finding a goo.. (11)
Regular Build (11)
Help with onclick and buttons (0)
Virus advise (8)
My monitor won't turn on after instal.. (1)
Internet Lost (3)
Dept. of HS: NSA 'Helped' Develop Vis.. (16)
Ideal cheap graph card for PC-Gaming? (18)
radeon x850xt platinum & shader 3 (6)
Graphics Card Upgrade Question (4)
For Sale BFG GTX285 OC2 with 10 year .. (3)


All times are GMT -4. The time now is 11:46 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28