Jump to content

include problems


ballhogjoni

Recommended Posts

I am trying to include my header.php file into my main index.php file. Every thing works except that I can't get an image to appear.

 

example:

 

header.php

		<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
			<tr>
				<td align="left">
				<img width="248" height="117" src="<?php $logo_location = "http://xxxxx/images/logo.gif"; echo $logo_location; ?>" alt="Diaper Cakes and Baby Gifts">
				</td>
			</tr>
		</table>
	</td>
</tr>
<tr>
	<td>
		<table align="center" width="900" border="1" cellpadding="0" bordercolor="#C0C0C0">
                <tr>
                	<td width="180" align="center" bgcolor="#FFFF99">
					<a href="<?php echo $Home_URL; ?>" class="style18"><?php echo $Home; ?></span></a>
			  		</td>
					<td width="180" align="center" bgcolor="#fdeaea">
					<a href="<?php echo $Bestsellers_URL; ?>" class="style18"><?php echo $Bestsellers; ?></a>
					</td>
					<td width="180" align="center" bgcolor="#AFDFF7">
					<a href="<?php echo $About_Us_URL; ?>" class="style18"><?php echo $About_Us; ?></a>
					</td>
					<td width="180" align="center" bgcolor="#FFFF99">
					<a href="<?php echo $Contact_Us_URL; ?>" class="style18"><?php echo $Contact_Us; ?></a>
					</td>
					<td width="180" align="center" bgcolor="#fdeaea">
					<a href="<?php echo $Checkout_URL; ?>" class="style18"><?php echo $Checkout; ?></a>
				</td>
				<td width="180" align="center" bgcolor="#AFDFF7">
					<a href="#" onClick="history.go(-1)" class="style18">Back one page</a>
					</td>
			</tr>
  </table>

 

 

index.php

 

<html>
<head>
<title>Diaper Cakes | Baby Gift Baskets | Baby Shower Gifts</title> 
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<?php include('style_sheets/main_style_sheet.css'); ?>
</head>
<body>
<!--------Nav--------->
<table width="900" border="5" align="center" cellpadding="0" bordercolor="666699" bgcolor="#FFFFFF">
<tr>
		<td align="center">
		<?php include('header.php'); ?>
	</td>
</tr>
<tr>
	<td>
		<table align="center" bgcolor="#FFFFFF" width="900" border="1" cellspacing="0" cellpadding="0">
  				<tr>
				<td width="145" valign="top" align="center">
					<table width="145" cellpadding="2" cellspacing="2" align="center">
						<tr>
							<td align="center">
							asfdsdfsdfasfdsdfsdf
							<?php include('left_nav.php'); ?>
							</td>
							<td width="750" align="center" valign="top">
								<table width="750" cellpadding="2" cellspacing="2" align="center">
									<tr>
										<td>
										<?php include('index_page_title.php')?><br>
										<?php include('top_content.php')?><br>
										<?php include('bottom_content.php'); ?><br>
										<?php include('bottom_links.php')?>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</td>
</tr>
</table>
<?php include("http://xxxxx/footer.php"); ?>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/58243-include-problems/
Share on other sites

I want to make it dynamic so I can change the logo from a form or something. Of course the

 

src="<?php $logo_location = "http://xxxxx/images/logo.gif"; echo $logo_location; ?>"

 

will look like

 

src="<?php $logo_location = $_POST['logo_location']; echo $logo_location; ?>"

 

for now I just need the logo to just show up.

Link to comment
https://forums.phpfreaks.com/topic/58243-include-problems/#findComment-288769
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.