本文整理汇总了PHP中student::details方法的典型用法代码示例。如果您正苦于以下问题:PHP student::details方法的具体用法?PHP student::details怎么用?PHP student::details使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类student
的用法示例。
在下文中一共展示了student::details方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: connection
<?php
include 'connection.php';
require 'class/class.php';
$conn = connection();
$sel = new student();
$s3lect = $sel->details($_GET['id'], $conn);
//print_r($s3lect);
if (empty($s3lect)) {
echo "</br>invalie user id";
} else {
$id = $s3lect['0']['id'];
$name = $s3lect['0']['name'];
$age = $s3lect['0']['age'];
$designation = $s3lect['0']['designation'];
if (!empty($_POST)) {
if (empty($_POST['id'])) {
$error_arr['id'] = "Empty Id";
} else {
$id = $_POST['id'];
}
if (empty($_POST['name'])) {
$error_arr['name'] = "Empty name";
} else {
$name = $_POST['name'];
}
if (empty($_POST['age'])) {
$error_arr['age'] = "Empty age";
} else {
$age = $_POST['age'];
}
示例2: connection
<?php
include 'connection.php';
require 'class/class.php';
$conn = connection();
$sel = new student();
$s3lect = $sel->details("", $conn);
//echo "<pre>";
//print_r($s3lect);
if (!empty($s3lect)) {
?>
<html>
<head>
<style type="text/css">
table{
border: 3px solid #43c51a;
padding: 12px;
margin: 30px;
}
tr{
border: 3px solid #43c51a;
}
</style>
</head>
<body>
<table>
<tr>
<th>Id</th>
<th>Name</th>