本文整理汇总了PHP中Connect_To_DB函数的典型用法代码示例。如果您正苦于以下问题:PHP Connect_To_DB函数的具体用法?PHP Connect_To_DB怎么用?PHP Connect_To_DB使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Connect_To_DB函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Connect_To_Server
</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";
}
示例2: 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>";
}