本文整理汇总了PHP中mysql_end函数的典型用法代码示例。如果您正苦于以下问题:PHP mysql_end函数的具体用法?PHP mysql_end怎么用?PHP mysql_end使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mysql_end函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
} //No action yet
elseif (!$_POST['username'] OR !$_POST['password']) {
drawlogin("missing");
}
elseif (validate($_POST['username'],$_POST['password']))
{
redirect("index.php");
}
else {
drawlogin("invalid");
}
ob_end_flush(); // Flush the buffer out to client
document_footer(); mysql_end();
function drawlogin($error) {
?>
<script type="text/javascript">
function formfocus() {
document.getElementById('username').focus();
}
window.onload = formfocus;
</script>
<body id="login-body">
<div class="login container center">
<img src='images/logo.png' /><img src='images/thesystemlogo.png'><br />
<h3 class="text-muted small">Please Log In</h3>
<?
if ($error == "invalid")
示例2: wowheadparser
break;
}
return $faction;
}
if (isset($_GET['charname'])) {
$cont = new wowheadparser();
$conn = mysql_open($serveraddress, $serveruser, $serverpass);
$sql = "SELECT guid,name,class,level,race,gender FROM `" . $server_cdb . "`.`characters` WHERE name='" . mysql_real_escape_string($_GET["charname"]) . "'";
$num_rows = mysql_num_rows($result);
$result = mysql_query($sql, $conn) or die(mysql_error());
if ($row = mysql_fetch_array($result)) {
$items = show_items($row["guid"]);
$all = array_merge($items);
$html->load('armory', $all);
}
mysql_end($conn);
}
//Get Base stats
function baseStats($charName)
{
include 'configs.php';
mysql_select_db($server_cdb, $connection_setup) or die(mysql_error());
$sql = "SELECT guid,name,class,level,race FROM characters WHERE name='" . $charName . "'";
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($result);
mysql_select_db($server_wdb, $connection_setup) or die(mysql_error());
$wSql = "SELECT str,agi,sta,inte,spi,basehp as hp, basemana as mana FROM player_levelstats level,\n player_classlevelstats class WHERE level.race='" . $row['race'] . "' AND level.class='" . $row['class'] . "' AND\n level.level='" . $row['level'] . "' AND class.class='" . $row['class'] . "' AND class.level='" . $row['level'] . "'";
$result = mysql_query($wSql) or die(mysql_error());
$baseStats = mysql_fetch_array($result);
/* Here you have the bases stats
echo $baseStats['str'];
示例3: check_validated
check_validated();
//If a new user was submitted!
if (isset($_POST['newuser-submit'])) {
$userinfo = array("username" => $_POST['username'], "fname" => $_POST['fname'], "lname" => $_POST['lname'], "emplid" => $_POST['emplid'], "password" => $_POST['password'], "email" => $_POST['email'], "phone" => $_POST['phone'], "address" => $_POST['address'], "pwconfirm" => $_POST['pwconfirm']);
adduser($userinfo);
}
if (!check_app_admin()) {
header('Location: index.php');
}
open_page("Not User Management");
draw_page();
close_page();
ob_end_flush();
// Flush the buffer out to client
document_footer();
mysql_end();
//The actual page.
function draw_page()
{
?>
<div class="container">
<?php
open_panel("userlist", "User List", false);
?>
<div class="row">
<div class="col-md-10">
<?php
draw_user_list();