if(isset($_GET['about'])){ $title="About"; } elseif(isset($_GET['castandcrew'])){ error_reporting(E_ALL); ini_set('display_errors', true); $host=""; // Host name $db_username=""; // Username $db_password=""; // Password $db_name=""; $findingme_db=mysqli_connect("$host", "$db_username", "$db_password", "$db_name")or die("cannot connect"); $title="Cast and Crew"; $content2='<div class="castcrew_bio_wrapper"> <div class="castcrew_wrapper">'; $findingme_result=mysqli_query($findingme_db, "SELECT * FROM `castandcrew`"); $current_state=false; while($findingme_row=mysqli_fetch_assoc($findingme_result)){ $cast_crew_url2=str_replace(" ", "", strtolower($findingme_row['name'])); if($cast_crew_url2!="morganhennum"){ $cast_crew_url="/castandcrew/$cast_crew_url2"; } else{ $cast_crew_url="/castandcrew"; } if($current_state!=$findingme_row['crew_cast']){ $current_state=$findingme_row['crew_cast']; $content2.='<div class="castcrew_title">'.ucfirst($findingme_row['crew_cast']).'</div>'; } if($findingme_row['name']!=''){ $content2.='<div class="castcrew_entry"><a href="'.$cast_crew_url.'">'.ucwords($findingme_row['name']).'</a></div>'; } } $content2.=' </div> </div>'; } elseif(isset($_GET['video'])){ $title="Video"; } elseif(isset($_GET['stills'])){ $title="Stills"; } elseif(isset($_GET['investors'])){ $title="Investors"; $content2=' <div class="investors"> We welcome the opportunity to speak with investors regarding our film project.<br /> You may contact us a <a href="mailto:investors@findingmemovie.com">investors@findingmemovie.com</a> for details on our projects. <br /> <br /> <span class="disclosure">The information on this website is not to be construed as an offer to sell, or a solicitation of an offer to buy, securities. <br /> An investment in any security can only be made pursuant to an offering memorandum or disclosure document, the delivery of which has been authorized by Finding Me Productions, L.L.C.</span> </div> '; } else{ $content2='<div class="page_header">Home</div>'; }
$content=pagetitle($title).$content2;
?>
index.php aka layout
PHP Code:
<?php require 'content.php'; ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <base href="http://www.findingmemovie.com/" /> <title>Finding Me - The Movie<?php if(isset($title)){ echo " - $title";} ?></title> <meta charset="UTF-8" /> <meta name="keywords" content="Production, Area 51, Area 51 Entertainment, Film, Movie, Movies, Films, Television, Show, Shows, Web, Webseries, Web-Series, Andrew, McCarrick, Finding Me, Finding, Me, crash, car, auto, automobile, fight, fighting, bully, bullies, sisters, sister" /> <meta name="description" content="Finding Me - After her sister's tragic death,12 year-old Erin O’Connor vows bloody revenge when she learns the truth about what really happened." /> <meta name="author" content="Andrew McCarrick" /> <meta name="robots" content="index, follow" /> <link rel="stylesheet" href="/style_site.css" media="screen" /> <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> </head> <body> <div class="top_bar"> <div class="links_left"> <div class="top_link"><a href="/index2.php">Home</a></div> <div class="top_link"><a href="/about">About</a></div> <div class="top_link"><a href="/castandcrew">Cast & Crew</a></div> </div> <div class="title">FINDING ME</div> <div class="links_right"> <div class="top_link"><a href="/video">Video</a></div> <div class="top_link"><a href="/stills">Stills</a></div> <div class="top_link"><a href="/investors">Investors</a></div> </div> </div> <div class="content"> <?php echo $content; ?> </div> <div class="footer_wrapper"> <div class="footer_left footer_text"> <?php echo copyyear(2012)." Finding Me Productions, L.L.C. All rights reserved."; ?> </div> <div class="links_right"> </div> <div class="prodco_donors"> <div class="prodco"> <a href="http://www.area51entertainment.co/" target="_new"><img class="prodco_logo" src="area51.png" /></a> </div> <div class="donors"> <span class="bold">Fundraiser Donors:</span> Christopher Barrett, Amelia Ortman, Steve Daniels, Moira Black, Gary Damm, Christine Koehler, <br /> Morgan Hennum, Andrew Willmott, Eric Paperth, Andrew McCarrick, Sabina G. Kufner, Samuel Kpakiwa, Alyssa Ruland, Lisa Hoffman, Jennifer Colletti, Giles Shepherd, Michele Reeve, Marie Balitsos, And a few Annonymous Donors </div> </div> </div> </body> </html>
Last edited by HDRebel88; 12-13-2012 at 05:32 PM..
The cast and crew link points to a page 'castandcrew' without the .php extension (if the php code is not run then it results in a blank page). I suggest this may be the cause, or your file re-directions are not set up correctly.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
It was working all along... I'm on 1and1 and they have this stupid thing where if they find a folder or file with a name (aka /castandcrew) that doesn't exist, the server automatically finds a file name with something similar i.e; castandcrew.php. And I had a castandcrew.php file uploaded, thus it loaded that, which was blank.
Of course all of that auto detecting and rerouting is done prior to my .htaccess rule, so it overwrote my rule.
Thanks guys for helping me try to figure this out.
AndrewGSW your post was what ultimately made figure out what was happening so thanks.
Last edited by HDRebel88; 12-13-2012 at 06:33 PM..