Re: Blank Page?

From: Date: Wed, 03 Sep 2008 19:31:50 +0000
Subject: Re: Blank Page?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-45351@lists.php.net to get a copy of this message
Add the line: error_reporting(E_ALL); at the top of your functions page On Wed, Sep 3, 2008 at 9:29 PM, Chris Hale <php@chrishale.co.uk> wrote: > I have a functions page: > function connect() > { > include("includes/Vars.php"); > mysql_connect($host, $user, $passwd) or die("Couldn't connect to > database"); > mysql_select_db($db) or die("Couldn't select database"); > } > function pagecontent() > switch($_GET[page]) > { > connect(); > case "about" : > $sql = "SELECT * FROM page WHERE name='about'"; > $result = mysql_query($sql); > $row = mysql_fetch_assoc($result); > extract($row) > echo <h2>{$title}</h2>;\n > echo $content ; > break; > case "contact" : > $sql = "SELECT * FROM page WHERE name='contact'"; > $result = mysql_query($sql); > $row = mysql_fetch_assoc($result); > extract($row) > echo <h2>{$title}</h2>;\n > echo $content ; > break; > default : > $sql = "SELECT * FROM page WHERE name='home'"; > $result = mysql_query($sql,$cxn); > $row = mysql_fetch_assoc($result); > extract($row) > echo <h2>{$title}</h2>;\n > echo $content ; > break; > } > return; > } > and when i include that in another document and try and run the functions: > > <div id="column_right"> > <div class="content"> > <?php pagecontent(); ?> > </div> > </div> > > The page appears completely blank. Im new to this and i am struggling to get > anything to work. > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.db (#45351) next »