Help involving PHP site

Discussion in 'Programming' started by Dazed&Confused, Oct 17, 2007.

  1. #1
    Ack! I'm a newbie at this stuff, I am working on a site that is made of PHP files and after uploading one particular page that I made a tiny change to (I added another text area to a form) some elements of the page are missing. It is like the javascript is not calling them to the page anymore. I have looked through the code and it looks identical to other pages which are laid out exactly the same. The site is www.clarkcages.com, and the page that is broken is the Request for Literature page. There is supposed to be a left navigation and footer.

    Anyone tell me why it isn't working? When I uploaded it, I included the dependent files, and the original files have not changed location at all.

    Thanks!
     
    Dazed&Confused, Oct 17, 2007 IP
  2. Lordy

    Lordy Peon

    Messages:
    1,643
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you may want to paste your code here...we can't help you without the code
     
    Lordy, Oct 17, 2007 IP
  3. Dazed&Confused

    Dazed&Confused Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    oops sorry, here...

    <html>
    <head>
    <title>Welcome to Clark Cages</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <?php
    // get javascript file
    $filename = "/usr/home0/ccages/public_html/javascript/scripts.js";
    $fd = fopen ($filename, "r");
    $contents = fread ($fd, filesize ($filename));
    fclose ($fd);
    echo $contents;
    ?>
    <link href="stylesheets/clarkcages.css" rel="stylesheet" type="text/css">
    </head>
    <body bgcolor="#000000" ONLOAD="preloadImages();" class="mystyle">
    <table width="750" height="560" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td width="188" height="560" valign="top" bgcolor="#000000">
    <?php
    // get leftnavigation file
    $filename = "/usr/home0/ccages/public_html/leftnavigation.php";
    $fd = fopen ($filename, "r");
    $contents = fread ($fd, filesize ($filename));
    fclose ($fd);
    echo $contents;
    ?></td>
    <td valign="top" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" cellpadding="5" cellspacing="5">
    <tr>
    <td><form name="pricinginformation" action="customerinfo.php" method="post">
    <p class="mystyle"><img src="images/yestext.gif"></p>
    <p class="mystyle"><strong><font color="#FF0000">Hold your &quot;control key&quot; (PC) or &quot;command key&quot; (Mac) to select more than one module.</font></strong></p>
    <strong><font size="2">Basic Modules</font><br>
    <select name="basicmodules_frm[]" size="5" multiple>
    <option value="2 foot">2'</option>
    <option value="3 foot">3'</option>
    <option value="4 foot">4'</option>
    <option value="5 foot">5'</option>
    <option value="6 foot">6'</option>
    </select>
    <strong><font size="2">
    <input type="radio" name="rtabasic_frm" value="ready-to-assemble">
    <font size="1">Ready-to-Assemble
    <input type="radio" name="rtabasic_frm" value="assembled">
    Assembled </font></font></strong></p>
    <p><strong><font size="2">Combined Modules</font><font size="2"><br>
    <font size="1">
    <select name="combinedmodules_frm[]" size="5" multiple>
    <option value="2 foot">2'</option>
    <option value="3 foot">3'</option>
    <option value="4 foot">4'</option>
    <option value="5 foot">5'</option>
    <option value="6 foot">6'</option>
    </select>
    </font><strong><font size="2">
    <input type="radio" name="rtacombined_frm" value="ready-to-assemble">
    <font size="1">Ready-to-Assemble
    <input type="radio" name="rtacombined_frm" value="assembled">
    Assembled </font></font></strong></p>
    <p><strong><font size="2">Cat Wards</font><font size="2"><br>
    <font size="1"> </font></font></strong><font size="1">
    <select name="catwards_frm[]" size="3" multiple>
    <option value="4 foot">4'</option>
    <option value="5 foot">5'</option>
    <option value="6 foot">6'</option>
    </select>
    </font><strong><font size="2">
    <input type="radio" name="rtacatward_frm" value="ready-to-assemble">
    <font size="1">Ready-to-Assemble
    <input type="radio" name="rtacatward_frm" value="assembled">
    Assembled </font></font></strong></p>
    <p><strong><font size="2">Typical Ward Arrangements</font><font size="2"><br>
    <font size="1"> </font></font></strong><font size="1">
    <select name="typicalwards_frm[]" size="3" multiple>
    <option value="8 foot">8'</option>
    <option value="9 foot">9'</option>
    <option value="10 foot">10'</option>
    </select>
    </font><strong><font size="2">
    <input type="radio" name="rtatypical_frm" value="ready-to-assemble">
    <font size="1">Ready-to-Assemble
    <input type="radio" name="rtatypical_frm" value="assembled">
    Assembled </font></font></strong> </p>
    <p class="mystyle"><font size="2"><strong>Clark Dryer</strong><br>
    <font size="1">
    <input type="checkbox" name="dryer_frm" value="yes">
    Clark Dryer</font> </font></p>
    <p class="mystyle"><font size="2"><strong>Clark Cage Floors<br>
    <font size="1"></strong>
    <input type="checkbox" name="clarkcagefloors_frm" value="yes">
    Clark Cage Floors</font> </font></p>
    <p class="mystyle"><font size="2"><strong>Clark Floors for Stainless
    Steel Cages<br>
    </strong><font size="1">
    <select name="floors_frm[]" size="5" multiple>
    <option value="16 x 28">16&quot; x 28&quot;</option>
    <option value="22 x 28">22&quot; x 28&quot;</option>
    <option value="28 x 28">28&quot; x 28&quot;</option>
    <option value="34 x 28">34&quot; x 28&quot;</option>
    <option value="46 x 28">46&quot; x 28&quot;</option>
    </select>
    </font></p>
    <p class="mystyle"><font size="2"><strong>Clark Run Floors</strong></font><br>
    <font size="1">
    <input type="checkbox" name="runfloors_frm" value="yes">
    Clark Run Floors</font> </p>
    <p class="mystyle"><font size="2"><strong>Clark Cage Accessories</strong></font><br>
    <select name="accessories_frm[]" size="8" multiple>
    <option value="client card holder">Client Card Holder</option>
    <option value="locking casters">Locking Casters</option>
    <option value="cat resting bench">Cat Resting Bench</option>
    <option value="cat scratching post">Cat Scratching Post</option>
    <option value="porthole">Porthole</option>
    <option value="removable divider">Removable Divider</option>
    <option value="trays">Trays</option>
    <option value="tempered glass">Tempered Glass</option>
    </select>
    <p class="mystyle">
    <input type="submit" name="Submit" value="Continue">
    <input type="reset" name="Submit2" value="Reset Form">
    </p>
    </form></td>
    </tr></table></td>
    </tr>

    </table><?php
    // get footer file
    $filename = "/usr/home0/ccages/public_html/footer.php";
    $fd = fopen ($filename, "r");
    $contents = fread ($fd, filesize ($filename));
    fclose ($fd);
    echo $contents;
    ?>
    </body>
    </html>


    This is for the entire page... the two files that are not showing up are the footer.php and the leftnavigation.php

    Thanks!
     
    Dazed&Confused, Oct 17, 2007 IP
  4. Lordy

    Lordy Peon

    Messages:
    1,643
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #4
    woah, i don't like the way you have your left/bottom navigation.

    of course, it's not my decision :p

    can you highlight what you edited? or comment it?

    also, please put this in [.php] and [/.php] tags without the .

    also, can you paste a copy of //get sidebar and //get footer from another file?
     
    Lordy, Oct 17, 2007 IP
  5. Dazed&Confused

    Dazed&Confused Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Unfortunately I didn't design this site, or write the code, but I am now responsible for fixing things involved with it :S

    <html>
    <head>
    <title>Welcome to Clark Cages</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <?php
    // get javascript file
    $filename = "/usr/home0/ccages/public_html/javascript/scripts.js";
    $fd = fopen ($filename, "r");
    $contents = fread ($fd, filesize ($filename));
    fclose ($fd);
    echo $contents;
    ?>
    <link href="stylesheets/clarkcages.css" rel="stylesheet" type="text/css">
    </head>
    <body bgcolor="#000000" ONLOAD="preloadImages();" class="mystyle">
    <table width="750" height="560" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td width="188" height="560" valign="top" bgcolor="#000000">
    <?php
    // get leftnavigation file
    $filename = "/usr/home0/ccages/public_html/leftnavigation.php";
    $fd = fopen ($filename, "r");
    $contents = fread ($fd, filesize ($filename));
    fclose ($fd);
    echo $contents;
    ?></td>
    <td valign="top" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" cellpadding="5" cellspacing="5">
    <tr>
    <td><form name="pricinginformation" action="customerinfo.php" method="post">
    <p class="mystyle"><img src="images/yestext.gif"></p>
    <p class="mystyle"><strong><font color="#FF0000">Hold your &quot;control key&quot; (PC) or &quot;command key&quot; (Mac) to select more than one module.</font></strong></p>
    <strong><font size="2">Basic Modules</font><br>
    <select name="basicmodules_frm[]" size="5" multiple>
    <option value="2 foot">2'</option>
    <option value="3 foot">3'</option>
    <option value="4 foot">4'</option>
    <option value="5 foot">5'</option>
    <option value="6 foot">6'</option>
    </select>
    <strong><font size="2">
    <input type="radio" name="rtabasic_frm" value="ready-to-assemble">
    <font size="1">Ready-to-Assemble
    <input type="radio" name="rtabasic_frm" value="assembled">
    Assembled </font></font></strong></p>
    <p><strong><font size="2">Combined Modules</font><font size="2"><br>
    <font size="1">
    <select name="combinedmodules_frm[]" size="5" multiple>
    <option value="2 foot">2'</option>
    <option value="3 foot">3'</option>
    <option value="4 foot">4'</option>
    <option value="5 foot">5'</option>
    <option value="6 foot">6'</option>
    </select>
    </font><strong><font size="2">
    <input type="radio" name="rtacombined_frm" value="ready-to-assemble">
    <font size="1">Ready-to-Assemble
    <input type="radio" name="rtacombined_frm" value="assembled">
    Assembled </font></font></strong></p>
    <p><strong><font size="2">Cat Wards</font><font size="2"><br>
    <font size="1"> </font></font></strong><font size="1">
    <select name="catwards_frm[]" size="3" multiple>
    <option value="4 foot">4'</option>
    <option value="5 foot">5'</option>
    <option value="6 foot">6'</option>
    </select>
    </font><strong><font size="2">
    <input type="radio" name="rtacatward_frm" value="ready-to-assemble">
    <font size="1">Ready-to-Assemble
    <input type="radio" name="rtacatward_frm" value="assembled">
    Assembled </font></font></strong></p>
    <p><strong><font size="2">Typical Ward Arrangements</font><font size="2"><br>
    <font size="1"> </font></font></strong><font size="1">
    <select name="typicalwards_frm[]" size="3" multiple>
    <option value="8 foot">8'</option>
    <option value="9 foot">9'</option>
    <option value="10 foot">10'</option>
    </select>
    </font><strong><font size="2">
    <input type="radio" name="rtatypical_frm" value="ready-to-assemble">
    <font size="1">Ready-to-Assemble
    <input type="radio" name="rtatypical_frm" value="assembled">
    Assembled </font></font></strong> </p>
    <p class="mystyle"><font size="2"><strong>Clark Dryer</strong><br>
    <font size="1">
    <input type="checkbox" name="dryer_frm" value="yes">
    Clark Dryer</font> </font></p>
    <p class="mystyle"><font size="2"><strong>Clark Cage Floors<br>
    <font size="1"></strong>
    <input type="checkbox" name="clarkcagefloors_frm" value="yes">
    Clark Cage Floors</font> </font></p>
    <p class="mystyle"><font size="2"><strong>Clark Floors for Stainless
    Steel Cages<br>
    </strong><font size="1">
    <select name="floors_frm[]" size="5" multiple>
    <option value="16 x 28">16&quot; x 28&quot;</option>
    <option value="22 x 28">22&quot; x 28&quot;</option>
    <option value="28 x 28">28&quot; x 28&quot;</option>
    <option value="34 x 28">34&quot; x 28&quot;</option>
    <option value="46 x 28">46&quot; x 28&quot;</option>
    </select>
    </font></p>
    <p class="mystyle"><font size="2"><strong>Clark Run Floors</strong></font><br>
    <font size="1">
    <input type="checkbox" name="runfloors_frm" value="yes">
    Clark Run Floors</font> </p>
    <p class="mystyle"><font size="2"><strong>Clark Cage Accessories</strong></font><br>
    <select name="accessories_frm[]" size="8" multiple>
    <option value="client card holder">Client Card Holder</option>
    <option value="locking casters">Locking Casters</option>
    <option value="cat resting bench">Cat Resting Bench</option>
    <option value="cat scratching post">Cat Scratching Post</option>
    <option value="porthole">Porthole</option>
    <option value="removable divider">Removable Divider</option>
    <option value="trays">Trays</option>
    <option value="tempered glass">Tempered Glass</option>
    </select>
    <p class="mystyle">
    <input type="submit" name="Submit" value="Continue">
    <input type="reset" name="Submit2" value="Reset Form">
    </p>
    </form></td>
    </tr></table></td>
    </tr>
    
    </table><?php
    // get footer file
    $filename = "/usr/home0/ccages/public_html/footer.php";
    $fd = fopen ($filename, "r");
    $contents = fread ($fd, filesize ($filename));
    fclose ($fd);
    echo $contents;
    ?>
    </body>
    </html>
    PHP:
    There's the page again, I'll have to copy the // get navbar and //get footer once I get back to work tomorrow. I am pretty certain I checked those out and they were identical to this page.
     
    Dazed&Confused, Oct 17, 2007 IP
  6. Lordy

    Lordy Peon

    Messages:
    1,643
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #6
    whoever did design it, did a really really really terrible job of spacing :(

    or is it spaced in your file? if so, i didnt mean to copy it off this forum :p i could have done that

    it could possibly have something to do with having a fixed height/width, but i dont think it is.
     
    Lordy, Oct 17, 2007 IP
  7. Dazed&Confused

    Dazed&Confused Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Sorry, I didn't think it made a difference :( I am a graphic designer, not a programmer LOL

    I'll repost it tomorrow when I get back to work directly from the file itself. It's funny you should mention the fixed height/width...I emailed a teacher of mine (who is not a programmer either, but knows a heck of a lot more than I do about this sort of stuff) and he mentioned that maybe adjusting the height/width of the form essentially squeezed out the other files? The ONLY thing I have done to this file at all, was to add another text area to the form itself.

    I JUST now noticed that I actually posted the page that is working (DUH) so I'll repost the correct one tomorrow.

    Thanks for taking the time to help me out on this!!
     
    Dazed&Confused, Oct 17, 2007 IP
  8. Dazed&Confused

    Dazed&Confused Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Here is the broken page...

    <html>
    <head>
    <title>Welcome to Clark Cages</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <?php 
    	// get javascript file
    	$filename = "/usr/home0/ccages/public_html/javascript/scripts.js";
    	$fd = fopen ($filename, "r");
    	$contents = fread ($fd, filesize ($filename));
    	fclose ($fd);
    	echo $contents;
    ?>
    <link href="stylesheets/clarkcages.css" rel="stylesheet" type="text/css">
    </head>
    <body bgcolor="#000000" ONLOAD="preloadImages();" class="mystyle">
    <table width="750" height="560" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr> 
        <td width="188" height="560" valign="top" bgcolor="#000000"> 
         <?php 
    		// get leftnavigation file
    		$filename = "/usr/home0/ccages/public_html/leftnavigation.php";
    		$fd = fopen ($filename, "r");
    		$contents = fread ($fd, filesize ($filename));
    		fclose ($fd);
    		echo $contents;
    	?></td>
        <td valign="top" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" cellpadding="5" cellspacing="5">
            <tr> 
              <td><form name="form1" method="post" action="processliterature_fcn.php">
                  <p class="mystyle"><strong><img src="images/yesliterature.gif" width="503" height="18"></strong></p>
                  <p class="mystyle">Business Name: (required)<br>
                    <input name="busname_frm" type="text" id="busname_frm" size="40" maxlength="40">
    </p>
                  <p class="mystyle">Contact Name: (required)<br>
                    <input name="name_frm" type="text" size="40" maxlength="40">
    </p>
                  <p class="mystyle">Address: (required)<br>
                    <input name="address_frm" type="text" size="40" maxlength="40">
                  </p>
                  <p class="mystyle">City/Town: (required)<br>
                    <input name="city_frm" type="text" size="40" maxlength="40">
                  </p>
                  <p class="mystyle">Province/State: (required)<br>
                    <input type="text" name="province_frm">
                  </p>
                  <p class="mystyle">Postal Code/Zip: (required)<br>
                    <input name="postalcode_frm" type="text" size="10" maxlength="10">
                  </p>
                  <p class="mystyle">Telephone Number:<br>
                    <input name="dayphone_frm" type="text" size="30" maxlength="14">
                    <br>
                    Fax:<br>
                    <input name="eveningphone_frm" type="text" size="30" maxlength="30">
                  </p>
                  <p class="mystyle">Email: <br>
                    <input name="email_frm" type="text" size="40" maxlength="40">
                  </p>
                  <p class="mystyle"> 
                    <input type="submit" name="Submit" value="Submit">
                    <input type="reset" name="Submit2" value="Reset Form">
                  </p>
                </form></td>
            </tr></table></td>
      </tr>
    </table>
    	<?php 
    		// get footer file
    		$filename = "/usr/home0/ccages/public_html/footer.php";
    		$fd = fopen ($filename, "r");
    		$contents = fread ($fd, filesize ($filename));
    		fclose ($fd);
    		echo $contents;
    	?>
    </body>
    </html>
    PHP:
    And here are the //get tags from another page...

    <?php 
    		// get footer file
    		$filename = "/usr/home0/ccages/public_html/footer.php";
    		$fd = fopen ($filename, "r");
    		$contents = fread ($fd, filesize ($filename));
    		fclose ($fd);
    		echo $contents;
    	?>
    PHP:
    <?php 
    		// get leftnavigation file
    		$filename = "/usr/home0/ccages/public_html/leftnavigation.php";
    		$fd = fopen ($filename, "r");
    		$contents = fread ($fd, filesize ($filename));
    		fclose ($fd);
    		echo $contents;
    	?>
    PHP:
     
    Dazed&Confused, Oct 18, 2007 IP