当前位置: 首页>>代码示例>>PHP>>正文


PHP Connect_To_Server函数代码示例

本文整理汇总了PHP中Connect_To_Server函数的典型用法代码示例。如果您正苦于以下问题:PHP Connect_To_Server函数的具体用法?PHP Connect_To_Server怎么用?PHP Connect_To_Server使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Connect_To_Server函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: session_start

<?php 
// lf hmc convever..
session_start();
if (!isset($_SESSION['access']) or $_SESSION['access'] != 3) {
    $_SESSION['access'] = 0;
    session_destroy();
    header('location:/sen/Modules/Login/login.php');
}
require_once 'db.php';
$db = Connect_To_Server();
$db_found = Connect_To_DB();
$ty = "Water";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> </title>
</head>

<body>
<?php 
//3/ perform database query
// for deleteing complaints.........................................................
$result = mysql_query("SELECT t1.*,t2.wing,t2.floor,t2.room FROM complaints AS t1 JOIN residents AS t2 ON t1.id = t2.login_id where Type = '{$ty}' order by serviced ", $db);
if (!$result) {
    die("database selection failed:" . mysql_error());
}
//4. use returned data
//while($row = mysql_fetch_array($result)){
开发者ID:nikamipara,项目名称:SEN,代码行数:30,代码来源:complaints_Water_hmc_convener_view.php

示例2: Connect_To_Server

			<a href="http://intranet.daiict.ac.in">Intranet</a>
		</li>
		<li>
			<a href="/sen/Modules/Signout.php">Sign Out</a>
		</li>
	</ul>
</nav>
      </fieldset>
    </form>
  </header>
</div>
<!-- content -->
<div class="wrapper row2">
  <div id="status">
	<marquee behavior="scroll" direction="left" scrollamount="20"><?php 
$db_handle = Connect_To_Server();
$db_found = Connect_To_DB();
view_dhobi();
echo " And ";
view_doctor();
Close_To_Server($db_handle);
function view_dhobi()
{
    $SQL_Query = "select name from dhobi_status where present='i' limit 1";
    $result = mysql_query($SQL_Query);
    $out = mysql_fetch_assoc($result);
    $name = $out['name'];
    if ($name != "") {
        echo "Dhobi {$name} Is Present";
    } else {
        echo "No Dhobi Is Present";
开发者ID:nikamipara,项目名称:SEN,代码行数:31,代码来源:Snail_mail_resident_view.php

示例3: view_form_doctor

function view_form_doctor()
{
    $db_handle = Connect_To_Server();
    $db_found = Connect_To_DB();
    $SQL_Query = "select doctor_id,name from doctor";
    $result = mysql_query($SQL_Query);
    if ($result == false) {
        echo mysql_error();
    } else {
        //	echo "<FORM NAME='form3' METHOD='POST' ACTION='gate.php' >";
        echo "<table>";
        echo "<tr><td>Doctor Name: </td><td><select name='doctor_id'>";
        while ($out = mysql_fetch_assoc($result)) {
            $name = $out['name'];
            $doctor_id = $out['doctor_id'];
            echo "<option value={$doctor_id}>  {$name} </option>";
        }
        echo "</td></tr>";
        echo "</select>";
        echo "<tr><td>";
        echo "<input type='SUBMIT' NAME='SUBMIT12' VALUE='Doctor Enter' >";
        echo "</td><td>";
        echo "<input type='SUBMIT' NAME='SUBMIT13' VALUE='Doctor Exit' >";
        echo "</td></tr>";
    }
    echo "</table>";
}
开发者ID:nikamipara,项目名称:SEN,代码行数:27,代码来源:Gate_guard.php


注:本文中的Connect_To_Server函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。