Re: Blank Page?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx> 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
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux