source: extensions/oAuth/include/test/examples/signin_signup/application.config.php @ 20293

Last change on this file since 20293 was 20293, checked in by mistic100, 11 years ago

first commit of oAuth plugin, still in developpement

File size: 1.2 KB
Line 
1<?php 
2        // load hybridauth base file, change the following paths if necessary
3        // note: in your application you probably have to include these only when required.
4        $hybridauth_config = dirname(__FILE__) . '/../../hybridauth/config.php';
5        require_once( "../../hybridauth/Hybrid/Auth.php" );
6
7        // database config
8        $database_host = "localhost"; 
9        $database_user = "root";
10        $database_pass = "";
11        $database_name = "hybridauth_test";
12
13        $database_link = @ mysql_connect( $database_host, $database_user, $database_pass );
14
15        if ( ! $database_link ) {
16                die( "This sample requires a Mysql database. Please edit the configuration file: <b>application.config.php</b>. <hr><b>Mysql error</b>: " . mysql_error() );
17        }
18
19        $db_selected = mysql_select_db( $database_name );
20
21        if ( ! $db_selected ) {
22                die( "This sample requires a Mysql database. Please edit the configuration file: <b>application.config.php</b>. <hr><b>Mysql error</b>: " . mysql_error() );
23        }
24
25        function mysql_query_excute( $sql ){ 
26                $result = mysql_query($sql);
27
28                if (!$result) {
29                        $message  = 'Invalid query: ' . mysql_error() . "\n";
30                        $message .= 'Whole query: ' . $sql;
31                        die($message);
32                }
33
34                return $result;
35        }
Note: See TracBrowser for help on using the repository browser.