Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    May 2011
    Posts
    124
    Thanks
    12
    Thanked 6 Times in 6 Posts

    Page Returns Blank

    I can't for the life of me figure out why this page is returning blank. The DB connects without an issue, but I don't see anything at all on the page.

    PHP Code:
    elseif(isset($_GET['castandcrew'])){
    error_reporting(E_ALL);
    $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)){
    if(
    $findingme_row['name']!="Morgan Hennum"){
    $cast_crew_url='/castandcrew/';
    $cast_crew_url.=str_replace(" """strtolower($findingme_row['name']));
    }
    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>'
    ;
    }
    $content=pagetitle($title).$content2
    Last edited by HDRebel88; 12-13-2012 at 07:29 PM.

  • #2
    Regular Coder poyzn's Avatar
    Join Date
    Nov 2010
    Posts
    266
    Thanks
    2
    Thanked 61 Times in 61 Posts
    where is echo $content ?

  • #3
    New Coder
    Join Date
    Apr 2008
    Posts
    36
    Thanks
    4
    Thanked 0 Times in 0 Posts
    poyzn is right just add:

    echo $content;

  • #4
    Regular Coder
    Join Date
    May 2011
    Posts
    124
    Thanks
    12
    Thanked 6 Times in 6 Posts
    Sorry left out the detail that this page is included in to another echo $content already is.

  • #5
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    After your error_reporting() call add:
    PHP Code:
    ini_set('display_errors'true); 

  • #6
    Regular Coder
    Join Date
    May 2011
    Posts
    124
    Thanks
    12
    Thanked 6 Times in 6 Posts
    Still a blank page after I add that... http://www.findingmemovie.com/index2.php Click the Cast & Crew link.

    content.php
    PHP Code:
    <?php
    function copyyear($setyear){
        return (
    "© $setyear" . ((date('Y') != $setyear)? " - " date('Y') : ''));
    }
    function 
    pagetitle($title_text){
        return (
    "<div class=\"page_header\">$title_text</div>");
    }


    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 06:32 PM.

  • #7
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    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

  • Users who have thanked AndrewGSW for this post:

    HDRebel88 (12-13-2012)

  • #8
    Regular Coder
    Join Date
    May 2011
    Posts
    124
    Thanks
    12
    Thanked 6 Times in 6 Posts
    Using Mod-Rewrite... All the other pages are functioning as they should with mod-rewrite... no reason this one isn't either.

    EDIT: Actually it looks like mod-rewrite might be the issue because this URL works: http://www.findingmemovie.com/index2.php?castandcrew

    Here's the mod re-write:

    Code:
    RewriteEngine on
    
    RewriteCond %{HTTP_HOST} ^findingmemovie\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.findingmemovie\.com$
    RewriteRule ^donate$ "http://www.indiegogo.com/findingme2/x/538302" [R=301]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([^/]+)(/([^/]+))?/?$ /index2.php?$1=$3 [QSA]
    It works for everything else though.

    It worked previously, prior to me switching over to using a database, when I had all the links in the list hard coded in.
    Last edited by HDRebel88; 12-13-2012 at 07:06 PM.

  • #9
    Regular Coder
    Join Date
    May 2011
    Posts
    124
    Thanks
    12
    Thanked 6 Times in 6 Posts
    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 07:33 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •