Blank Page?

From: Date: Wed, 03 Sep 2008 19:29:04 +0000
Subject: Blank Page?
Groups: php.db 
Request: Send a blank email to php-db+get-45350@lists.php.net to get a copy of this message
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.

« previous php.db (#45350) next »