本文整理汇总了PHP中mysqlConnection::close方法的典型用法代码示例。如果您正苦于以下问题:PHP mysqlConnection::close方法的具体用法?PHP mysqlConnection::close怎么用?PHP mysqlConnection::close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mysqlConnection
的用法示例。
在下文中一共展示了mysqlConnection::close方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insertMember
function insertMember($host, $user, $pass, $database, $table)
{
$query = "INSERT INTO {$table} (ime,prezime,adresa,postnum,mjesto,telefon,email,skola,clan,auto,izlet,majica,boja,velicina,user,password) VALUES ('{$this->ime}', '{$this->prezime}', '{$this->adresa}', '{$this->brojPoste}', '{$this->mjesto}', '{$this->telefon}', '{$this->email}', '{$this->skola}', '{$this->clan}', '{$this->auto}', '{$this->izlet}', '{$this->majica}', '{$this->boja}', '{$this->velicina}', '{$this->username}', '" . md5($this->password) . "')";
try {
$conn = new mysqlConnection($host, $user, $pass, $database);
$conn->open();
mysql_query($query);
$success = true;
$conn->close();
unset($conn);
} catch (Exception $e) {
echo $e->getMessage();
$success = false;
}
return $success;
}
示例2: unset
unset($sudionik);
echo "<SCRIPT LANGUAGE='javascript'>window.alert ('Prijava uspje¹no izvr¹ena! Na email koji ste unijeli stiæi æe vam ostale upute.'); window.open('index.php','_self');</SCRIPT>";
} else {
unset($sudionik);
echo "<SCRIPT LANGUAGE='javascript'>window.alert ('Gre¹ka prilikom prijave!'); window.open('index.php','_self');</SCRIPT>";
}
$tip = NULL;
break;
case "login":
$username = $_REQUEST["txtUserName"];
$password = $_REQUEST["txtPassword"];
$conn = new mysqlConnection($dbhostname, $dbusername, $dbpassword, $dbname);
$conn->open();
if (!validateLoginData($username, $password, $conn->dbconnection)) {
echo "<SCRIPT LANGUAGE='javascript'>window.alert ('Pogre¹no upisani podaci ili niste prijavljeni na skup!'); window.open('index.php','_self');</SCRIPT>";
$conn->close();
unset($conn);
} else {
if (isAdmin($username)) {
$query = "SELECT ime, prezime, adresa, postnum, mjesto, telefon, email, skola, clan, auto, izlet, majica, boja, velicina, user FROM " . $dbtbl;
$result = mysql_query($query);
if (mysql_num_rows($result) <= 0) {
$conn->close();
unset($conn);
echo "<SCRIPT LANGUAGE='javascript'>window.alert ('Nema zapisa!');window.open('index.php','_self');</SCRIPT>";
} else {
echo '
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/style.css" />