用数据库的输入填充下拉框,从而导致另一个填充的页面
Populating a drop down box with inputs from database that'd lead to another populated page
所以我自愿在工作中创建一个用户表单,并认为我应该添加一个有趣的小转折,用HTML/CSS/PHP/mySQL而不是MS word来做。
基本上,这是一个表单,我将使用添加和删除用户从我的数据库。我已经完成了初始的形式,创建了一个PHP文件,以保存一切在我的数据库和链接它正确。
我的问题是,我如何创建一个页面与所有的名字/姓氏/id的下拉列表,在那里的人浏览它可以点击"提交",并获得有关用户的所有信息?
我已经在谷歌上搜索了几个小时了,但无济于事,因为似乎有些人有类似的问题,但却缺少了一些我需要的大拼图。
我知道这听起来有点令人困惑,所以这里是我的代码,以便您可以更好地理解:
HTML:@charset "UTF-8";
table,
th,
td {} table {
border-collapse: collapse;
}
td {
padding: 3px;
}
input[type="text"],
textarea {
background-color: #F8FCFF;
border: 2px solid #eeeeee;
color: #333333;
font-size: 0.9em;
font-style: normal;
font-weight: 400;
font-family: Tahoma;
Helvetica;
}
body {
background-color: #e6e6e6;
margin: 0 auto;
}
f {
font-style: normal;
font-weight: 550;
font-family: sans-serif;
source-sans-pro;
}
bigbold {
font-style: normal;
font-weight: bold;
font-size: 20px;
font-family: sans-serif;
source-sans-pro;
}
info {
font-style: normal;
font-weight: bold;
font-family: sans-serif;
source-sans-pro;
}
.tr-top {
border-top: 1pt solid black;
}
.tr-left {
border-left: 1pt solid black;
}
.td-left {
border-left: 1pt solid black;
width: 35%;
}
.checkboxes label {
display: block;
float: left;
padding-right: 10px;
white-space: nowrap;
}
.checkboxes input {
vertical-align: middle;
}
.checkboxes label span {
vertical-align: middle;
}
#body1 {
width: 1000px;
background: #fff;
height: 100%;
}
#wrapper {
max-width: 1000px;
height: 100%;
background: #fff;
margin: 0px auto 0;
padding: 20px;
}
#colour {
background: #C6DEFF;
}
</style>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled D
<!--#include file="NewUser_get.php" -->
ocument</title>
<link href="Untitled-4.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--<div id="body1">-->
<div id="wrapper">
<div id="head">
<form action="NewUser_get.php" method="POST">
<table style="width:1000px">
<tr>
<td width=90%>
<f>Request date:</f>
<br>
<input type="date" name="RequestDate">
</td>
<td width=10%>
<f>Requested by:</f>
<br>
<input type="text" style="width: 166px;" name="RequestBy">
</td>
</tr>
</table>
<br>
<div id="colour">
<info>
<center>New User Info</center>
</info>
</div>
<br>
<table style="width:100%">
<tr>
<td>
<f>Employee's last name: </f>
<input type="text" placeholder="Click to type" name="LastName">
</td>
<td>
<f>First name
<input type="text" placeholder="Click to type" name="FirstName">
</td>
<td>
<f>Middle name
<input type="text" placeholder="Click to type" name="MiddleName">
</td>
<td>
<f>Employment type
<select name="EmploymentType">
<option value="Permanent">Permanent</option>
<option value="Temporary">Temporary</option>
<option value="Contractor">Contractor</option>
<option value="Placement">Placement</option>
<option value="Other">Other</option>
</select>
</td>
<td width="80px">
<f> Gender</f>
<br>
<label for="GenderMale">
<input type="checkbox" name="GenderMale" value="Yes" /> <span>M</span>
</label>
<label for="GenderFemale">
<input type="checkbox" name="GenderFemale" value="Yes" /> <span>F</span>
</label>
</td>
</tr>
<tr>
<td>
<f>Department </f>
<br>
<input type="text" placeholder="Click to type" name="Department1">
</td>
<td>
<f>Job title </f>
<input type="text" placeholder="Click to type" name="JobTitle">
</td>
<td>
<f>Manager's name </f>
<input type="text" placeholder="Click to type" name="ManagerName">
</td>
<td>
<f>Start date </f>
<br>
<input type="date" placeholder="Click to type" name="StartDate">
</td>
<td>
<f>Finish date </f>
<input type="date" style="width: 166px;" name="FinishDate">
</td>
</tr>
</table>
<br>
<table style="width:100%">
<tr>
<td>
<f>Full address:</f>
<br>
<input type="text" style="width: 992px;" placeholder="Click to type, Address/ P.O. Box, City, Street, Post code" name="FullAddress">
</td>
</tr>
</table>
<br>
<table style="width:100%">
<tr>
<td>
<f>User Group / Profile to Use:</f>
<input type="text" style="width: 325px;" placeholder="Click to type, e.g. same as John, Accounts" name="UserGroup">
</td>
<td>
<f>Distribution Groups to be included:</f>
<input type="text" style="width: 325px;" placeholder="Click to type, e.g. Staff, Internal, External" name="DistributionGroup">
</td>
<td>
<f>Shared Drive Access:</f>
<input type="text" style="width: 325px;" placeholder="Click to type" name="SharedDriveAccess">
</td>
</tr>
</table>
<br>
<table style="width:100%">
<tr>
<td>
<f>Permissions on shared drives (in detail):</f>
<br>
<input type="text" style="width: 993px;" placeholder="Click to type, e.g. Marketing drive 'read only, Technical drive 'Full Access'" name="Permissions">
</td>
</tr>
</table>
<br>
<div id="colour">
<info>
<center>Additional Info</center>
</info>
</div>
<br>
<div class="checkboxes">
<table style="width:100%">
<tr>
<td width="%50">
<bigbold>List of required items (Tick the box next to an item):</bigbold>
</td>
<td> </td>
<td class="td-left" width="%50">
<bigbold>List of required software/drive access:</bigbold>
</td>
</tr>
<tr>
<td></td>
<td></td>
<td class="td-left">
<info> Drives:</info>
</td>
<td>
<info> Software:</info>
</td>
</tr>
<tr>
<td>
<label for="iPad">
<input type="checkbox" name="iPad" value="Yes"> <span><f>iPad + case</f></span>
</label>
</td>
<td>
<label for="Mouse">
<input type="checkbox" name="Mouse" value="Yes"> <span><f>Mouse</f></span>
</label>
</td>
<td class="td-left">
<label for="Sales">
<input type="checkbox" name="Sales" value="Yes"><span><f>Sales</f></span>
</label>
</td>
<td>
<label for="Salesforce">
<input type="checkbox" name="Salesforce" value="Yes"> <span><f>Salesforce</f></span>
</label>
</td>
</tr>
<tr>
<td>
<label for="iPhone">
<input type="checkbox" name="iPhone" value="Yes"> <span><f>iPhone + case</f></span>
</label>
</td>
<td>
<label for="Laptopb">
<input type="checkbox" name="Laptopb" value="Yes"> <span><f>Laptop bag</f></span>
</label>
</td>
<td class="td-left">
<label for="Marketing">
<input type="checkbox" name="Marketing" value="Yes"> <span><f>Marketing</f></span>
</label>
</td>
<td>
<label for="VPN">
<input type="checkbox" name="VPN" value="Yes"> <span><f>VPN</f></span>
</label>
</td>
</tr>
<tr>
<td>
<label for="Laptop">
<input type="checkbox" name="Laptop" value="Yes"> <span><f>Laptop</f></span>
</label>
</td>
<td>
<label for="Dphone">
<input type="checkbox" name="Dphone" value="Yes"> <span><f>Desk phone</f></span>
</label>
</td>
<td class="td-left">
<label for="General">
<input type="checkbox" name="General" value="Yes"> <span><f>General</f></span>
</label>
</td>
<td>
<label for="Terminal">
<input type="checkbox" name="Terminal" value="Yes"> <span><f>Terminal server</f></span>
</label>
</td>
</tr>
<tr>
<td>
<label for="Desktop">
<input type="checkbox" name="Desktop" value="Yes" /> <span><f>Desktop</f></span>
</label>
</td>
<td>
<label for="Printerw">
<input type="checkbox" name="Printerw" value="Yes"> <span><f>Printer (work)</f></span>
</label>
</td>
<td class="td-left">
<label for="CAD">
<input type="checkbox" name="CAD" value="Yes"> <span><f>CAD</f></span>
</label>
</td>
</tr>
<tr>
<td>
<label for="Printerh">
<input type="checkbox" name="Printerh" value="Yes"> <span><f>Printer (home)</f></span>
</label>
</td>
<td>
<label for="Dongle">
<input type="checkbox" name="Dongle" value="Yes"> <span><f>Dongle</f></span>
</label>
</td>
<td class="td-left">
<label for="Finance">
<input type="checkbox" name="Finance" value="Yes"> <span><f>Finance</f></span>
</label>
</td>
</tr>
<tr>
<td>
<label for="Monitor">
<input type="checkbox" name="Monitor" value="Yes"> <span><f>Monitor</f></span>
</label>
</td>
<td>
<label for="MiFi">
<input type="checkbox" name="Mifi" value="Yes"> <span><f>MiFi (Mobile Wifi)</f></span>
</label>
</td>
<td class="td-left">
<label for="Accounts">
<input type="checkbox" name="Accounts" value="Yes"> <span><f>Accounts</f></span>
</label>
</td>
<td></td>
</tr>
<tr>
<td>
<label for="Keyboard">
<input type="checkbox" name="Keyboard" value="Yes"> <span><f>Keyboard</f></span>
</label>
</td>
<td></td>
<td class="td-left"></td>
<td></td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</table>
<div id="colour">
<center>
<info>Miscellaneous:</info>
</center>
</div>
<br>
<table style="width:100%">
<tr>
<td>
<f>Should the predecessor's email be assigned to this user?</f>
</td>
<td>
<label for="Pemail">
<input type="checkbox" name="Pemail" value="Yes"> <span><f>Yes</f></span>
</label>
</td>
</tr>
<tr class="tr-top">
<td>
<f>Is the user replacing someone else from the staff or is he/she a completely new employee?</f>
</td>
<td>
<label for="Replacement">
<input type="checkbox" name="Replacement" value="Yes"> <span><f>Replacement</f></span>
</label>
</td>
<td>
<label for="NewUser">
<input type="checkbox" name="NewUser" value="Yes"> <span><f>New user</f></span>
</label>
</td>
</tr>
</table>
<br>
<textarea name="AddRequirements" style="width:1000px;" placeholder="Please continue here for any other extra requirements e.g. need of a special signature, software, hardware etc. or needed access to another user’s files and documents, or assign another user’s email profile to this user so they inherit all files and folders form the old user."></textarea>
<!--<input type='hidden' name='articleid' id='articleid' value='<? echo $_GET["id"]; ?>' /> -->
<input type="submit">
</form>
</div>
</div>
</body>
</html>
PHP: <?php
if( $_POST )
{
$conn = mysqli_connect("myhost","myuser","mypassword", "mydb");
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$RequestBy = $_POST['RequestBy'];
$FirstName = $_POST['FirstName'];
$MiddleName = $_POST['MiddleName'];
$LastName = $_POST['LastName'];
$Desktop = $_POST['Desktop'];
$EmploymentType = $_POST['EmploymentType'];
$GenderMale = $_POST['GenderMale'];
$GenderFemale = $_POST['GenderFemale'];
$Department1 = $_POST['Department1'];
$JobTitle = $_POST['JobTitle'];
$ManagerName = $_POST['ManagerName'];
$FullAddress = $_POST['FullAddress'];
$UserGroup = $_POST['UserGroup'];
$DistributionGroup = $_POST['DistributionGroup'];
$SharedDriveAccess = $_POST['SharedDriveAccess'];
$Permissions = $_POST['Permissions'];
$iPad = $_POST['iPad'];
$Mouse = $_POST['Mouse'];
$Sales = $_POST['Sales'];
$Salesforce = $_POST['Salesforce'];
$iPhone = $_POST['iPhone'];
$Laptopb = $_POST['Laptopb'];
$Marketing = $_POST['Marketing'];
$VPN = $_POST['VPN'];
$Laptop = $_POST['Laptop'];
$Dphone = $_POST['Dphone'];
$General = $_POST['General'];
$Terminal = $_POST['Terminal'];
$Printerw = $_POST['Printerw'];
$CAD = $_POST['CAD'];
$Printerh = $_POST['Printerh'];
$Dongle = $_POST['Dongle'];
$Finance = $_POST['Finance'];
$Monitor = $_POST['Monitor'];
$Mifi = $_POST['Mifi'];
$Accounts = $_POST['Accounts'];
$Keyboard = $_POST['Keyboard'];
$Pemail = $_POST['Pemail'];
$Replacement = $_POST['Replacement'];
$NewUser = $_POST['NewUser'];
$AddRequirements = $_POST['AddRequirements'];
}
$sql= "
INSERT INTO TestTable (RequestBy, FirstName, MiddleName, LastName, Desktop, EmploymentType, GenderMale, GenderFemale, Department1, JobTitle, ManagerName, FullAddress, UserGroup, DistributionGroup, SharedDriveAccess, Permissions, iPad, Mouse, Sales, Salesforce, iPhone, Laptopb, Marketing, VPN, Laptop, Dphone, General, Terminal, Printerw, CAD, Printerh, Dongle, Finance, Monitor, Mifi, Accounts, Keyboard, Pemail, Replacement, NewUser, AddRequirements) VALUES ('$RequestBy', '$FirstName', '$MiddleName', '$LastName', '$Desktop', '$EmploymentType', '$GenderMale', '$GenderFemale', '$Department1', '$JobTitle', '$ManagerName', '$FullAddress', '$UserGroup', '$DistributionGroup', '$SharedDriveAccess', '$Permissions', '$iPad', '$Mouse', '$Sales', '$Salesforce', '$iPhone', '$Laptopb', '$Marketing', '$VPN', '$Laptop', '$Dphone', '$General', '$Terminal', '$Printerw', '$CAD', '$Printerh', '$Dongle', '$Finance', '$Monitor', '$Mifi', '$Accounts', '$Keyboard', '$Pemail', '$Replacement', '$NewUser', '$AddRequirements');";
if (mysqli_query($conn, $sql)) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}
mysqli_close($conn);
?>
基本上我想创建另一个页面,在那里我可以选择用户的名字,点击一些按钮,然后看到所有的信息,如访问"销售"驱动器,性别等显示。
忽略代码中缺乏安全措施,它将被很少值得信赖的人在本地服务器上使用。
如果有人能在正确的道路上引导我,我将不胜感激。提前谢谢你。似乎需要一点AJAX来完成这一点。首先,您需要制作包含选择框的php
文件。注意,您必须在html .
In select_user.php
<?php
//Connection to database
$connection = mysqli_connect('localhost', 'root', 'your_password', 'your_database');
mysqli_set_charset($connection, 'utf8');
if (!$connection) {
die("Database connection failed: " . mysqli_error());
}
//Simple query to populate the select box
$query = "SELECT id, FirstName, LastName FROM TestTable ORDER BY FirstName ASC, LastName ASC, id ASC;";
$result = mysqli_query($connection, $query);
if (mysqli_num_rows($result) > 0) { //If there are records in database table
echo '<select id="user" name="user">';
while ($row = mysqli_fetch_array($result)) {
echo '<option value="'.$row['id'].'">'.$row['FirstName'].' '.$row['LastName'].'</option>';
}
echo '</select>';
} else {
echo '<p class="alert">There are no data to select from.</p>';
}
?>
<div id="results">
</div>
然后,您必须编写一些AJAX请求服务器获取具有所选id的用户(注意,通常您必须非常小心用户输入)。
在select_user.php
底部
<script>
$(document).ready(function(){
//Each time that the value of select box changes then make an ajax call and bring the user details
$('#user').on('change', function() {
var id = $(this).val();
$.ajax({
async: false,
url: "ajax.php",
type: "POST",
data: {id : id},
dataType: "json",
success: function(data) {
//Check if data is empty or make some other validations
var firstName = data.FirstName;
var lastName = data.LastName;
var fullAddress = data.FullAddress;
var permissions = data.Permissions;
var str = '<p>Name: '+firstName+' '+lastName+' '+fullAddress+' '+permissions+'</p>';
//Replace content at #results div
$('#results').innerHtml(str);
}
});
}
}
</script>
最后,您必须创建文件ajax.php
,其中包含返回所选用户详细信息的查询。
文件ajax.php
<?php
//This is ajax.php
//Connection to database
$connection = mysqli_connect('localhost', 'root', 'your_password', 'your_database');
mysqli_set_charset($connection, 'utf8');
if (!$connection) {
die("Database connection failed: " . mysqli_error());
}
$id = $_POST['id'];
//Never trust input from users
//Sanitize and validate variables
//Use prepared statemends or PDO
$query = "SELECT id, FirstName, LastName, FullAddress, Permissions FROM TestTable WHERE id = '$id';";
$result = mysqli_query($connection, $query);
$row = mysqli_fetch_array($result);
$json['id'] = $row['id'];
$json['firstName'] = $row['FirstName'];
$json['lastName'] = $row['LastName'];
$json['fullAddress'] = $row['FullAddress'];
$json['permisions'] = $row['Permissions'];
echo json_encode($json);
mysqli_close($connection);
?>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</head>
<?php
//Connection to database
$connection = mysqli_connect("*****************","***********","****", "******");
mysqli_set_charset($connection, 'utf8');
if (!$connection) {
die("Database connection failed: " . mysqli_error());
}
//Simple query to populate the select box
$query = "SELECT id, FirstName, LastName FROM TestTable ORDER BY FirstName ASC, LastName ASC, id ASC;";
$result = mysqli_query($connection, $query);
if (mysqli_num_rows($result) > 0) { //If there are records in database table
echo '<select id="user" name="user">';
while ($row = mysqli_fetch_array($result)) {
echo '<option value="'.$row['id'].'">'.$row['FirstName'].' '.$row['LastName'].'</option>';
}
echo '</select>';
} else {
echo '<p class="alert">There are no data to select from.</p>';
}
?>
<div id="results">
</div>
<script>
$(document).ready(function(){
//Each time that the value of select box changes then make an ajax call and bring the user details
$('#user').on('change', function() {
var id = $(this).val();
$.ajax({
async: false,
url: "ajax.php",
type: "POST",
data: {id : id},
dataType: "json",
success: function(data) {
//Check if data is empty or make some other validations
var firstName = data.FirstName;
var lastName = data.LastName;
var fullAddress = data.FullAddress;
var permissions = data.Permissions;
var str = '<p>Name: '+firstName+' '+lastName+' '+fullAddress+' '+permissions+'</p>';
//Replace content at #results div
$('#results').innerHtml(str);
}
});
}
}
</script>
<div id="results">
</div>
这是select_user.php
文件:
<?php
//Connection to database
$connection = mysqli_connect("****","****","****", "***");
mysqli_set_charset($connection, 'utf8');
if (!$connection) {
die("Database connection failed: " . mysqli_error());
}
//Simple query to populate the select box
$query = "SELECT id, FirstName, LastName FROM TestTable ORDER BY FirstName ASC, LastName ASC, id ASC;";
$result = mysqli_query($connection, $query);
if (mysqli_num_rows($result) > 0) { //If there are records in database table
echo '<select id="user" name="user">';
while ($row = mysqli_fetch_array($result)) {
echo '<option value="'.$row['id'].'">'.$row['FirstName'].' '.$row['LastName'].'</option>';
}
echo '</select>';
} else {
echo '<p class="alert">There are no data to select from.</p>';
}
?>
<div id="results">
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js">
$(document).ready(function(){
//Each time that the value of select box changes then make an ajax call and bring the user details
$('#user').on('change', function() {
var id = $(this).val();
$.ajax({
async: false,
url: "ajax.php", //Tried changing this to domainname.com/ajax.php but that didn't change anything.
type: "POST",
data: {id : id},
dataType: "json",
success: function(data) {
//Check if data is empty or make some other validations
var firstName = data.FirstName;
var lastName = data.LastName;
var fullAddress = data.FullAddress;
var permissions = data.Permissions;
var str = '<p>Name: '+firstName+' '+lastName+' '+fullAddress+' '+permissions+'</p>';
//Replace content at #results div
$('#results').innerHtml(str);
}
});
}
}
</script>
<div id="results">
</div>
这是ajax.php
:
<?php
//This is ajax.php
//Connection to database
$connection = mysqli_connect("******","******","*******", "*******");
mysqli_set_charset($connection, 'utf8');
if (!$connection) {
die("Database connection failed: " . mysqli_error());
}
$id = $_POST['id'];
//Never trust input from users
//Sanitize and validate variables
//Use prepared statemends or PDO
$query = "SELECT id, FirstName, LastName, FullAddress, Permissions FROM TestTable WHERE id = '$id';";
$result = mysqli_query($connection, $query);
$row = mysqli_fetch_array($result);
$json['id'] = $row['id'];
$json['firstName'] = $row['FirstName'];
$json['lastName'] = $row['LastName'];
$json['fullAddress'] = $row['FullAddress'];
$json['permisions'] = $row['Permissions'];
echo json_encode($json);
mysqli_close($connection);
?>
这是HTML。
<!doctype html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<meta charset="utf-8">
<title>Untitled D
<!--#include file="NewUser_get.php" -->
ocument</title>
<link href="Untitled-4.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--<div id="body1">-->
<div id="wrapper">
<div id="head">
<center>
<img src="http://www.rwc.com/wp-content/themes/RWC_Global/assets/images/logo.png">
</center>
<form action="NewUser_get.php" method="POST">
<table style="width:1000px">
<tr>
<td width=90%>
<f>Request date:</f>
<br>
<input type="date" name="RequestDate">
</td>
<td width=10%>
<f>Requested by:</f>
<br>
<input type="text" style="width: 166px;" name="RequestBy">
</td>
</tr>
</table>
<br>
<div id="colour">
<info>
<center>New User Info</center>
</info>
</div>
<br>
<table style="width:100%">
<tr>
<td>
<f>Employee's last name: </f>
<input type="text" placeholder="Click to type" name="LastName">
</td>
<td>
<f>First name
<input type="text" placeholder="Click to type" name="FirstName">
</td>
<td>
<f>Middle name
<input type="text" placeholder="Click to type" name="MiddleName">
</td>
<td>
<f>Employment type
<select name="EmploymentType">
<option value="Permanent">Permanent</option>
<option value="Temporary">Temporary</option>
<option value="Contractor">Contractor</option>
<option value="Placement">Placement</option>
<option value="Other">Other</option>
</select>
</td>
<td width="80px">
<f> Gender</f>
<br>
<label for="GenderMale">
<input type="checkbox" name="GenderMale" value="Yes" /> <span>M</span>
</label>
<label for="GenderFemale">
<input type="checkbox" name="GenderFemale" value="Yes" /> <span>F</span>
</label>
</td>
</tr>
<tr>
<td>
<f>Department </f>
<br>
<input type="text" placeholder="Click to type" name="Department1">
</td>
<td>
<f>Job title </f>
<input type="text" placeholder="Click to type" name="JobTitle">
</td>
<td>
<f>Manager's name </f>
<input type="text" placeholder="Click to type" name="ManagerName">
</td>
<td>
<f>Start date </f>
<br>
<input type="date" placeholder="Click to type" name="StartDate">
</td>
<td>
<f>Finish date </f>
<input type="date" style="width: 166px;" name="FinishDate">
</td>
</tr>
</table>
<br>
<table style="width:100%">
<tr>
<td>
<f>Full address:</f>
<br>
<input type="text" style="width: 992px;" placeholder="Click to type, Address/ P.O. Box, City, Street, Post code" name="FullAddress">
</td>
</tr>
</table>
<br>
<table style="width:100%">
<tr>
<td>
<f>User Group / Profile to Use:</f>
<input type="text" style="width: 325px;" placeholder="Click to type, e.g. same as John, Accounts" name="UserGroup">
</td>
<td>
<f>Distribution Groups to be included:</f>
<input type="text" style="width: 325px;" placeholder="Click to type, e.g. Staff, Internal, External" name="DistributionGroup">
</td>
<td>
<f>Shared Drive Access:</f>
<input type="text" style="width: 325px;" placeholder="Click to type" name="SharedDriveAccess">
</td>
</tr>
</table>
<br>
<table style="width:100%">
<tr>
<td>
<f>Permissions on shared drives (in detail):</f>
<br>
<input type="text" style="width: 993px;" placeholder="Click to type, e.g. Marketing drive 'read only, Technical drive 'Full Access'" name="Permissions">
</td>
</tr>
</table>
<br>
<div id="colour">
<info>
<center>Additional Info</center>
</info>
</div>
<br>
<div class="checkboxes">
<table style="width:100%">
<tr>
<td width="%50">
<bigbold>List of required items (Tick the box next to an item):</bigbold>
</td>
<td> </td>
<td class="td-left" width="%50">
<bigbold>List of required software/drive access:</bigbold>
</td>
</tr>
<tr>
<td></td>
<td></td>
<td class="td-left">
<info> Drives:</info>
</td>
<td>
<info> Software:</info>
</td>
</tr>
<tr>
<td>
<label for="iPad">
<input type="checkbox" name="iPad" value="Yes"> <span><f>iPad + case</f></span>
</label>
</td>
<td>
<label for="Mouse">
<input type="checkbox" name="Mouse" value="Yes"> <span><f>Mouse</f></span>
</label>
</td>
<td class="td-left">
<label for="Sales">
<input type="checkbox" name="Sales" value="Yes"><span><f>Sales</f></span>
</label>
</td>
<td>
<label for="Salesforce">
<input type="checkbox" name="Salesforce" value="Yes"> <span><f>Salesforce</f></span>
</label>
</td>
</tr>
<tr>
<td>
<label for="iPhone">
<input type="checkbox" name="iPhone" value="Yes"> <span><f>iPhone + case</f></span>
</label>
</td>
<td>
<label for="Laptopb">
<input type="checkbox" name="Laptopb" value="Yes"> <span><f>Laptop bag</f></span>
</label>
</td>
<td class="td-left">
<label for="Marketing">
<input type="checkbox" name="Marketing" value="Yes"> <span><f>Marketing</f></span>
</label>
</td>
<td>
<label for="VPN">
<input type="checkbox" name="VPN" value="Yes"> <span><f>VPN</f></span>
</label>
</td>
</tr>
<tr>
<td>
<label for="Laptop">
<input type="checkbox" name="Laptop" value="Yes"> <span><f>Laptop</f></span>
</label>
</td>
<td>
<label for="Dphone">
<input type="checkbox" name="Dphone" value="Yes"> <span><f>Desk phone</f></span>
</label>
</td>
<td class="td-left">
<label for="General">
<input type="checkbox" name="General" value="Yes"> <span><f>General</f></span>
</label>
</td>
<td>
<label for="Terminal">
<input type="checkbox" name="Terminal" value="Yes"> <span><f>Terminal server</f></span>
</label>
</td>
</tr>
<tr>
<td>
<label for="Desktop">
<input type="checkbox" name="Desktop" value="Yes" /> <span><f>Desktop</f></span>
</label>
</td>
<td>
<label for="Printerw">
<input type="checkbox" name="Printerw" value="Yes"> <span><f>Printer (work)</f></span>
</label>
</td>
<td class="td-left">
<label for="CAD">
<input type="checkbox" name="CAD" value="Yes"> <span><f>CAD</f></span>
</label>
</td>
</tr>
<tr>
<td>
<label for="Printerh">
<input type="checkbox" name="Printerh" value="Yes"> <span><f>Printer (home)</f></span>
</label>
</td>
<td>
<label for="Dongle">
<input type="checkbox" name="Dongle" value="Yes"> <span><f>Dongle</f></span>
</label>
</td>
<td class="td-left">
<label for="Finance">
<input type="checkbox" name="Finance" value="Yes"> <span><f>Finance</f></span>
</label>
</td>
</tr>
<tr>
<td>
<label for="Monitor">
<input type="checkbox" name="Monitor" value="Yes"> <span><f>Monitor</f></span>
</label>
</td>
<td>
<label for="MiFi">
<input type="checkbox" name="Mifi" value="Yes"> <span><f>MiFi (Mobile Wifi)</f></span>
</label>
</td>
<td class="td-left">
<label for="Accounts">
<input type="checkbox" name="Accounts" value="Yes"> <span><f>Accounts</f></span>
</label>
</td>
<td></td>
</tr>
<tr>
<td>
<label for="Keyboard">
<input type="checkbox" name="Keyboard" value="Yes"> <span><f>Keyboard</f></span>
</label>
</td>
<td></td>
<td class="td-left"></td>
<td></td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</table>
<div id="colour">
<center>
<info>Miscellaneous:</info>
</center>
</div>
<br>
<table style="width:100%">
<tr>
<td>
<f>Should the predecessor's email be assigned to this user?</f>
</td>
<td>
<label for="Pemail">
<input type="checkbox" name="Pemail" value="Yes"> <span><f>Yes</f></span>
</label>
</td>
</tr>
<tr class="tr-top">
<td>
<f>Is the user replacing someone else from the staff or is he/she a completely new employee?</f>
</td>
<td>
<label for="Replacement">
<input type="checkbox" name="Replacement" value="Yes"> <span><f>Replacement</f></span>
</label>
</td>
<td>
<label for="NewUser">
<input type="checkbox" name="NewUser" value="Yes"> <span><f>New user</f></span>
</label>
</td>
</tr>
</table>
<br>
<textarea name="AddRequirements" style="width:1000px;" placeholder="Please continue here for any other extra requirements e.g. need of a special signature, software, hardware etc. or needed access to another user’s files and documents, or assign another user’s email profile to this user so they inherit all files and folders form the old user."></textarea>
<!--<input type='hidden' name='articleid' id='articleid' value='<? echo $_GET["id"]; ?>' /> -->
<input type="submit">
</form>
</div>
</div>
</body>
</html>
很抱歉回复晚了,有点忙。谢谢你的帮助,只是感觉我在这一点上无能为力,因为我真的不明白问题在哪里。
相关文章:
- 在输入字段中选择一个值,然后用相应的数据填充另一个字段
- 如何填充下拉列表,从javascript中的另一个下拉列表中排除任何一个选项
- 从另一个选择框并使用数据库连接填充选择框
- 如何根据另一个下拉列表的选择来填充多个下拉列表
- 使用另一个字段的日期+14天自动填充字段
- JQuery以基于另一个选择列表填充选择列表
- 使用Web服务根据对另一个下拉框的选择填充第二个下拉框以获取信息
- 在填充另一个选择框时动态添加选择框
- 在填充另一个输入框时动态添加输入框
- 使用字段值填充提交时的另一个复选框
- 如何使用 ajax 从一个文本框值自动填充另一个文本框值
- 有没有办法让我用另一个网站的图片自动填充我的网页
- 通过书签使用来自另一个网站的 url 自动填充文本字段
- 基于一个输入字段填充另一个输入字段
- 使用组合框填充另一个组合框,以便用户可以运行查询
- 使用链接自动填充另一个表单是可能的
- 在需要填充一个文本字段后,在填充另一个文本域时动态执行函数
- 如果ID丢失,请使用jquery填充另一个隐藏字段中的行
- 从下拉框中选择的选项填充另一个文本框/下拉值更改时的值
- 使用php从mysql检索数据并在同一HTML页面中填充另一个表单的表单