我想在我的代码的边界线上标记“会员登录”,但我不知道如何将其删除,我基本上想要这样的东西
如果您有“选择披萨大小”,我希望能够显示包含边框的文字,但我不知道如何操作。
我的代码:
的login.php
<html>
<head>
<title>Hospital Login</title>
<link href="login.css" rel="stylesheet" type="text/css">
</head>
<body>
<fieldset class="formDisplay">
<form name="form1" method="post" action="process_login.php">
<legend><strong>Member Login </strong></legend></br>
<strong>Username</strong></br></br> <input name="myusername" type="text" id="myusername">
</br></br>
<strong>Password</strong></br></br><input name="mypassword" type="password" id="mypassword">
</br></br>
<input type="submit" name="Submit" value="Login">
</form>
<?php
echo $message;
?>
</fieldset>
</body>
</html>
login.css
.formDisplay{
position:relative;
top: 15%;
left: 30%;
border: 5px groove threedface;
padding: 50px;
border-radius:20px;
width:400px;
height:250px;
text-align: center;
}
.formDisplay legend {
display: block;
word-wrap: initial;
}
提前感谢您的帮助
答案 0 :(得分:2)
您需要将表单元素包装在 function pdo_db_query($query,$columnArray) {
/* try {
# MySQL with PDO_MYSQL
$DBH = new dbconn(); // Create DB connection
$DBH->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$DBH->setAttribute( PDO::ATTR_EMULATE_PREPARES, false );
// Please help to create a dynamic function to bind
bind_params(sample_sql_1,array($name,$dob,$cty));
bind_params(sample_sql_2,array($cty));
*/
// Set the first clause to WHERE
$clause = " WHERE ";
foreach ($columnArray as $column) {
//Add column name and ? placeholder
$query .= "$clause $column = ?";
//Change WHERE to And for remaining conditions
$clause = " AND ";
}
//This echo is to show query
echo $query."<BR>";
// Execute query using Lazy Binding passing data into execute via array
/*$STH->execute($paramArray);
/*
// Create temporary array variable
$json_arr = array();
while ($row = $STH->fetch()) {
$json_arr[] = $row;
}
# Close the connection
$DBH = null;
*/
}
// Parameters for testing
$name ="Tom";
$dob ="2014-11-11";
$cty ="London";
$paramArray1 = array($name,$dob,$cty);
$paramArray2 = array($cty);
$columnArray1 = array("name","dob","cty");
$columnArray2 = array("cty");
$query = "select f_name, age, address from table1";
pdo_db_query($query,$columnArray2) ;
print_r($paramArray2);
?>
中并使&#34;会员登录&#34; fieldset
。
请参阅此处的基本示例:
http://www.w3schools.com/tags/tag_fieldset.asp
如需更深入的阅读,请访问:fieldset
element @ MDN
更新(根据对问题的修订)
代码中的问题是legend
在<{1}}元素之外。试试这个:
fieldset
答案 1 :(得分:-1)
试试这个:
#selection{
height:300px;
width:400px;
border:1px solid #666;
}
h3{
width:180px;
margin-top:-10px;
margin-left:10px;
background:#EEE;
padding-left:10px;
font-size:14px;
color:#000;
}
#spacer{
height:100px;
}
请参阅此处的示例: https://jsfiddle.net/aqx3kLqm/1/
只是为了让您知道,这不是防水解决方案,因为如果文本的长度不同,您需要在CSS中调整文本的内容。