view interface/add_missing_books_to_sections.php @ 3:f196939ccc03

error handle and alert feedback to user. If error occurs, user'll not be halted by the loading page and sections_revisions will recovery to previous version.
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 26 Jan 2015 12:19:39 +0100
parents da5309d54083
children 883ad980a43b
line wrap: on
line source

<?php
include_once('Lib_mb_utf8.php');
include_once('config.php');
include_once('edit_section_db.php');
set_time_limit(0);
ini_set('memory_limit', '-1');

$link_mysql = mysql_connect($mysql_server, $mysql_user, $mysql_password);
mysql_query("SET NAMES utf8");

if (!$link_mysql) {
    die('Could not connect: ' . mysql_error());
}

$db_selected = mysql_select_db($mysql_database, $link_mysql);
if (!$db_selected) {
    die ('Can\'t use foo : ' . mysql_error());
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
        <head
        </head>
        <body>
		<?php  
            add_missing_books_to_sections(); 
			
		?>
        </body>


</html>