ballhogjoni Posted July 3, 2007 Share Posted July 3, 2007 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> Quote Link to comment Share on other sites More sharing options...
trq Posted July 3, 2007 Share Posted July 3, 2007 What is the point of this....? src="<?php $logo_location = "http://xxxxx/images/logo.gif"; echo $logo_location; ?>" Just use.... src="http://xxxxx/images/logo.gif" Quote Link to comment Share on other sites More sharing options...
ballhogjoni Posted July 3, 2007 Author Share Posted July 3, 2007 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. Quote Link to comment Share on other sites More sharing options...
trq Posted July 3, 2007 Share Posted July 3, 2007 Still makes little sense. src="<?php echo $_POST['logo_location']; ?>" Could work, but then there will be no image untill a from has been submitted to this page. Quote Link to comment Share on other sites More sharing options...
ballhogjoni Posted July 3, 2007 Author Share Posted July 3, 2007 What about saving the url or image to a mysql db and then selecting it from the db? Would that make better sense? Quote Link to comment Share on other sites More sharing options...
trq Posted July 3, 2007 Share Posted July 3, 2007 Would that make better sense? Yes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.