0
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<!DOCTYPE html 
 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
    <title>age.php</title>
</head>

<body>

<?php
    require_once( 'output_functions.php' );

    function connect_to_database( $host, $user, $password, $dbname )
    {
        // Try to connect to database
        $dbconnection = mysql_connect('......', '...', '.....');
        if ( ! $dbconnection )
        {
            output_problem_page();
            die();
        }
        // Try to select database
        $dbselection = mysql_select_db( 'polls.sql');
        if ( ! $dbselection )
        {
            output_problem_page();
            die();
        }
        return $dbconnection;
    }

    function output_problem_page()
    {
        output_header( 'Database Problem', 'stylesheet.css' );
        output_paragraph( 'We seem to be experiencing difficulties. Please call back at a later time' );
        output_footer( 'The PHP team' );
    }



?>
</body>
</html>

Edited by Nick Evan: Fixed formatting

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Agarsia
0

is poll.sql a database or a file?
if you return a database it will not be printed as table, it will only connect to the database.
so nothing will ouputed with the page you posted above

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.