bound4h Posted January 14, 2007 Share Posted January 14, 2007 I am editing a pre-existing site that is using PHP. I was trying to change one of the links at the top of the page (.jpg) via the header.html page and now when i view the root page (index.html) the main body has placed itself BELOW everything on the page...like I made a table column too small or something.I did not change any table information, however, I am not sure what happened. This page is very important to a friend of mine and I have fairly deep knowledge of HTML but not PHP, CSS, etc...As of now, the page is not viewing right (OMG) and I would die if someone would help me. I have an index.php, header.html, footer.html (prob the basics) and just want it to view right.PLEASE if anyone has 10 minutes tonight, please help me.Thanks,Mike Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/ Share on other sites More sharing options...
scotmcc Posted January 14, 2007 Share Posted January 14, 2007 Hey there Mike, I'd love to help, but I can't seem to find any code in your post...Scot Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160303 Share on other sites More sharing options...
Eugene Posted January 14, 2007 Share Posted January 14, 2007 Some code will help the situation. Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160304 Share on other sites More sharing options...
bound4h Posted January 14, 2007 Author Share Posted January 14, 2007 Scott,How can I send you a PM?Mike Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160305 Share on other sites More sharing options...
scotmcc Posted January 14, 2007 Share Posted January 14, 2007 I don't think you can because you are a n00b :) You can e-mail me though, or we can chat using MSN, AIM, etc. Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160306 Share on other sites More sharing options...
bound4h Posted January 14, 2007 Author Share Posted January 14, 2007 Can you go to www.southerncharmbridal.net?That is the page I am trying to edit. There is an index.php, header.html and footer.html. There may be another but I think that is it.Does that help? Can you inherently see a problem by viewing the page? Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160307 Share on other sites More sharing options...
scotmcc Posted January 14, 2007 Share Posted January 14, 2007 Yep, I see the problem. It looks like an HTML typo... Let me look at the source for a minute. Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160308 Share on other sites More sharing options...
bound4h Posted January 14, 2007 Author Share Posted January 14, 2007 My AIM is dephtonial, cannot seem to find anyone.I'm online. Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160309 Share on other sites More sharing options...
scotmcc Posted January 14, 2007 Share Posted January 14, 2007 search your code for:[code]</table></table></table><table bgcolor="#FFFFFF" cellspacing="0" cellpadding="5" border="0"><tr> <td align=left width="450"><img src="images/index_headline.gif" width="370" height="25" alt="" border="0"><br><!--MAIN TEXT AREA BEGINS-->[/code]and remove 2 of the </table> tags. That seemed to make the page look better to me :)Scot Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160311 Share on other sites More sharing options...
bound4h Posted January 14, 2007 Author Share Posted January 14, 2007 Here is the index.php:[code]<?php # Script 6.6 - index.php// Include the configuration file for error management and such.require_once ('templates/config.inc'); // Set the page title and include the HTML header.$page_title = 'Welcome to the Southern Charm Bridal Network';include ('templates/header.html');?><table bgcolor="#FFFFFF" cellspacing="0" cellpadding="5" border="0"><tr> <td align=left width="450"><img src="images/index_headline.gif" width="370" height="25" alt="" border="0"><br><!--MAIN TEXT AREA BEGINS--><p><img src="images/photo_1.jpg" width="100" height="79" alt="" border="0" hspace="10" vspace="10" align="left">The Southern Charm Bridal Network is an association of weddingprofessionals serving the <strong>south Atlanta area</strong>, includingClayton, Coweta, Fayette, Henry, and Spalding counties. Southern Charm is synonymouswith caring, creativity, and commitment. Southern Charm creates synergyto serve your special event. </p> <p>The mission of the Southern Charm Bridal Network is: <em>"To provide bridaland special event services in the form of quality professionalism in allaspects associated with creating a special day that is forever memorableto our clients."</em></p></td></tr><tr> <td align=left width="450"><HR WIDTH="90%" align="center"><img src="images/photo_4.jpg" width="100" height="120" alt="" border="0" align="right" vspace="5" hspace="10"><p>Browse our web site to locate <strong><a href="http://www.southerncharmbridal.net/display.php">wedding vendors</a></strong> that can help make yourwedding or honeymoon be "forever memorable"! </p> <p> You can also meet with our vendors at our <a href="http://www.southerncharmbridal.net/show.php"><strong>annual bridal shows</strong></a>, held every year in March and September. Check out the details for next fall's show. </p></td></tr><tr> <td align=left width="450"><HR WIDTH="90%" align="center"><p><img src="images/photo_2.jpg" alt="" border="0" align="left" hspace="10" vspace="10">Would you like us to stay in touch with you as you plan your wedding? Subscribe to our <strong><a href="http://www.southerncharmbridal.net/newsletter.php">email newsletter</a></strong> for regular updates from SCBN. If you would like our vendors to contact you, take a moment to completeour <strong><a href="http://www.southerncharmbridal.net/contact.php">online information request form. </a></strong></p></td></tr><tr> <td align=left width="450"><HR WIDTH="90%" align="center"> </td></tr><!--MAIN TEXT AREA ENDS--></table><?php include ('templates/footer.html'); // Include the HTML footer.?>[/code]And here is header.html:[code]<?php # Script 12.1 - header.html// This page begins the HTML header for the public site.// Start output buffering and initialize a session.ob_start();session_start();// Check for a $page_title value.if (!isset($page_title)) { $page_title = 'Welcome to the Southern Charm Bridal Network';}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title><?php echo $page_title; ?></title></head><!-- Script header.inc --><!-- ImageReady Preload Script (skin_1.psd) --><SCRIPT TYPE="text/javascript"><!--function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; }}function changeImages() { if (document.images && (preloadFlag == true)) { for (var i=0; i<changeImages.arguments.length; i+=2) { document[changeImages.arguments[i]].src = changeImages.arguments[i+1]; } }}var preloadFlag = false;function preloadImages() { if (document.images) { index_03_ImageMap_02_over = newImage("images/index_03-ImageMap_02_over.jpg"); index_04_ImageMap_03_over = newImage("images/index_04-ImageMap_03_over.jpg"); index_05_ImageMap_04_over = newImage("images/index_05-ImageMap_04_over.jpg"); index_06_ImageMap_05_over = newImage("images/index_06-ImageMap_05_over.jpg"); index_07_ImageMap_06_over = newImage("images/index_07-ImageMap_06_over.jpg"); index_08_ImageMap_07_over = newImage("images/index_08-ImageMap_07_over.jpg"); preloadFlag = true; }}// --></SCRIPT><!-- End Preload Script --><LINK REL="STYLESHEET" HREF="stylesheet.css" TYPE="text/css"></HEAD><BODY ONLOAD="preloadImages();"><!-- ImageReady Slices (skin_1.psd) --><TABLE WIDTH=675 BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR="#FFFFFF" align="center"> <TR> <td width="100%"><TABLE WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD COLSPAN=2> <IMG SRC="../images/index_01.jpg" WIDTH=168 HEIGHT=91 BORDER=0 ALT="" USEMAP="#index_01_Map"></TD> <TD COLSPAN=5> <IMG SRC="../images/index_02.jpg" WIDTH=507 HEIGHT=91 ALT=""></TD> </TR> <TR> <TD> <IMG NAME="index_03" SRC="../images/index_03.jpg" WIDTH=126 HEIGHT=20 BORDER=0 ALT="" USEMAP="#index_03_Map"></TD> <TD COLSPAN=2> <IMG NAME="index_04" SRC="../images/index_04.jpg" WIDTH=113 HEIGHT=20 BORDER=0 ALT="" USEMAP="#index_04_Map"></TD> <TD> <IMG NAME="index_05" SRC="../images/index_05.jpg" WIDTH=132 HEIGHT=20 BORDER=0 ALT="" USEMAP="#index_05_Map"></TD> <TD> <IMG NAME="index_06" SRC="../images/index_06.jpg" WIDTH=103 HEIGHT=20 BORDER=0 ALT="" USEMAP="#index_06_Map"></TD> <TD> <IMG NAME="index_07" SRC="../images/index_07.jpg" WIDTH=88 HEIGHT=20 BORDER=0 ALT="" USEMAP="#index_07_Map"></TD> <TD> <IMG NAME="index_08" SRC="../images/index_08.jpg" WIDTH=113 HEIGHT=20 BORDER=0 ALT="" USEMAP="#index_08_Map"></TD> </TR> <TR> <TD> <IMG SRC="../images/spacer.gif" WIDTH=126 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="../images/spacer.gif" WIDTH=42 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="../images/spacer.gif" WIDTH=71 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="../images/spacer.gif" WIDTH=132 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="../images/spacer.gif" WIDTH=103 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="../images/spacer.gif" WIDTH=88 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="../images/spacer.gif" WIDTH=113 HEIGHT=1 ALT=""></TD> </TR></TABLE></td></tr><TR><td width="100%"> <TABLE WIDTH=675 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD width="125" bgcolor="#cccccc" valign="top"> <table width="125" bgcolor="#cccccc" VALIGN="top" CELLPADDING=5 BORDER="0"> <tr> <td> <p class=head>FIND A VENDOR</p> <!--BEGIN MAIN CATEGROY NAV MENU--> <p><?php $categories = array( 'Beauty, Makeup & Nails', 'Bridal Attire & Accessories', 'Bridal Consultants', 'Bridal Coordinators (On Site)', 'Cakes', 'Caterers', 'Decorating', 'Entertainment', 'Equipment Rental', 'Event Facilities', 'Financial Planning', 'Floral Design', 'Formal Wear', 'Gift Registry', 'Health & Fitness', 'Honeymoon & Travel', 'Insurance', 'Jeweler & Jewelry', 'Limousine Services', 'Liquor, Wine & Champagne', 'Music (Disc Jockey)', 'Music (Live)', 'Officiates & Clergy', 'Printing & Engraving', 'Photography', 'Real Estate', 'Videography', 'Miscellaneous Services' ); while (list(, $value) = each ($categories)) { ?> <a href="display.php?cat=<?php echo urlencode($value); ?>"><?php echo $value; ?></a><br><?php } ?> </p> <!--END MAIN CATEGROY NAV MENU--> </td> </tr> <tr> <td> <hr width="100%"> </td> </tr> <tr> <td> <p class=head>HELPFUL ARTICLES</p> <P> <a href="http://www.southerncharmbridal.net/licenses.php">Local Marriage Laws and Licenses</a><br> <a href="http://www.southerncharmbridal.net/timeline.php">Wedding Planning Timeline</a></P> </td> </tr> <tr> <td> <hr width="100%"> </td> </tr> <tr> <td> <p>Questions? Email us at<br> <a href="mailto:[email protected]">[email protected]</a></p> </td> </tr> </TABLE></TD> <TD width="550" valign="top"> <table width="100%" bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" valign="top"> <tr> <td valign="top" width="100%"> </table></table></table>[/code]Thanks so much guys. Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160312 Share on other sites More sharing options...
bound4h Posted January 14, 2007 Author Share Posted January 14, 2007 Where do see that <table>x3? I can't find it in my code? Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160314 Share on other sites More sharing options...
scotmcc Posted January 14, 2007 Share Posted January 14, 2007 Scroll down to the bottom of the header.html code you just posted. Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160316 Share on other sites More sharing options...
corbin Posted January 14, 2007 Share Posted January 14, 2007 Just a warning to you... templates/config.inc has your database stuff in it and is publicly viewable. Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160317 Share on other sites More sharing options...
bound4h Posted January 14, 2007 Author Share Posted January 14, 2007 Now look... I took one of the /tables out www.southerncharmbridal.net Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160318 Share on other sites More sharing options...
bound4h Posted January 14, 2007 Author Share Posted January 14, 2007 How can I make it not? This is a family site for me and its our only source of income, if anyone exploited it that would be horrible. What should I do? Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160320 Share on other sites More sharing options...
scotmcc Posted January 14, 2007 Share Posted January 14, 2007 Take the other one out.You should really consider looking into CSS... check out this site HTTP://WWW.CSSZENGARDEN.COM Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160322 Share on other sites More sharing options...
bound4h Posted January 14, 2007 Author Share Posted January 14, 2007 I took both out, and now it looks normal. Thank you so much.Corbin/Scot,Can you help me RE: the config.inc problem? That worries me. Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160323 Share on other sites More sharing options...
corbin Posted January 14, 2007 Share Posted January 14, 2007 Ahhh I posted that planning to edit my post, but now it wont let me edit it... I suggest changing it to config.php and changing all the other stuff accordingly, or add a file called ".htaccess" to the directory and make it say[code]deny from all[/code] Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160324 Share on other sites More sharing options...
scotmcc Posted January 14, 2007 Share Posted January 14, 2007 Rename it to config.inc.php (or something ending in PHP) and rename all calls to this file. That will force the server to pre-process the file before serving it up to a browser. Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160325 Share on other sites More sharing options...
bound4h Posted January 14, 2007 Author Share Posted January 14, 2007 Corbin,I appreciate your effort to help. I want to make sure I get this right, so I am going to be a noob and try and take it a step at a time.RENAME the file config.inc to config.php and CHANGE (what?) other stuff accordingly....ORADD a file (any file?) called (what).htaccess to the directory (same directory that config.inc is in?) and make it say "deny from all" (just plain text in the file and that's it? no <blah blah blah> stuff?)?Thank you again. Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160326 Share on other sites More sharing options...
scotmcc Posted January 14, 2007 Share Posted January 14, 2007 Rename the file to config.php and go through all of your other code, change anything that says "config.inc" to "config.php".For example (your index.php file):[code]// thisrequire_once ('templates/config.inc'); // should say this:require_once ('templates/config.php'); [/code] Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160328 Share on other sites More sharing options...
corbin Posted January 14, 2007 Share Posted January 14, 2007 You only need to do one or the other, although I suggest the .htaccess method so it denies all access to the files in that folder.Open notepad and type "deny from all" Do not put anything else!Then click file->save as and in the filename box type ".htaccess" with the quotes. It should create a file named .htaccessIt is just called .htaccess.. There is no file name.If your computer doesn't show file extensions then it will not show up, so make sure its set to display file extensions. Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160330 Share on other sites More sharing options...
bound4h Posted January 14, 2007 Author Share Posted January 14, 2007 Ok, I've changed it to config.inc.php and index.php seemed to be the only one I've found so far that had reference to config.inc.What flaws could this cause and what vulnerabilities was I susceptible to? Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160331 Share on other sites More sharing options...
bound4h Posted January 14, 2007 Author Share Posted January 14, 2007 OK, do I put the .htaccess file in the same dir that config.inc was in? Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160332 Share on other sites More sharing options...
corbin Posted January 14, 2007 Share Posted January 14, 2007 Yes.And as for risks, if you're mysql server accepts remote connections, someone could have gained access to your database. Link to comment https://forums.phpfreaks.com/topic/34094-please-somebody-help-me/#findComment-160334 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.