Php 标签标记未沿直线移动表单结构
标签标签有正确的语法,但是表单结构没有按照我想要的方式很好地对齐Php 标签标记未沿直线移动表单结构,php,html,Php,Html,标签标签有正确的语法,但是表单结构没有按照我想要的方式很好地对齐 echo "<form action='getregister.php' method='post'>"; echo "<fieldset >"; echo "<legend>Register</legend>"; echo "<input type='hidden' name='submitted' id='submitted' value='1'/>"; echo
echo "<form action='getregister.php' method='post'>";
echo "<fieldset >";
echo "<legend>Register</legend>";
echo "<input type='hidden' name='submitted' id='submitted' value='1'/>";
echo "<label for='First_name'>First Name: </label>";
echo "<input type='text' name='U_fname' id='First_name' value=''><br>";
echo "<label for='Last_name'>Last Name: </label>";
echo "<input type='text' name='U_sname' id='Last_name' value=''><br>";
echo "<label for='Address' >Address: </label>";
echo "<input type='text' name='U_address' id='Address' value=''><br>";
echo "<label for='Postcode' >Postcode: </label>";
echo "<input type='text' name='U_postcode' id='Postcode' value=''><br>";
echo "<label for='Telno' >Tel No: </label>";
echo "<input type='text' name='U_telNo' id='Telno' value=''><br>";
echo "<label for='Email' >Email Address: </label>";
echo "<input type='email' name='U_email' id='Email' value=''><br>";
echo "<label for='password' >Password:</label>";
echo "<input type='password' name='U_password' id='password' value=''><br>";
echo "<label for='passwords' >Confirm Password:</label>";
echo "<input type='password' name='U_confirmPassword' id='passwords' value=''><br>";
echo "<input type='submit' name='Submit' value='Register' />";
echo "<button type='reset' value='Reset'>Clear form</button>";
echo "</fieldset>";
echo "</form>";
echo”“;
回声“;
回声“寄存器”;
回声“;
回声“名字:”;
回声“
”;
回声“姓氏:”;
回声“
”;
回声“地址:”;
回声“
”;
回声“邮政编码:”;
回声“
”;
回音“电话号码:”;
回声“
”;
回音“电子邮件地址:”;
回声“
”;
回声“密码:”;
回声“
”;
echo“确认密码:”;
回声“
”;
回声“;
呼应“清晰的形式”;
回声“;
回声“;
试着这样做:
echo "<form action='getregister.php' method='post'>";
echo "<fieldset >";
echo "<legend>Register</legend>";
echo "<input type='hidden' name='submitted' id='submitted' value='1'/>";
echo "<table>";
echo "<tr>";
echo "<td><label for='First_name' >First Name: </label></td>";
echo "<td><input type='text' name='U_fname' value=''></td>";
echo "</tr>";
echo "<tr>";
echo "<td><label for='Last_name'>Last Name: </label></td>";
echo "<td><input type='text' name='U_sname' id='Last_name' value=''>";
echo "</tr>";
echo "<table>";
echo "</fieldset>";
echo "</form>";
echo”“;
回声“;
回声“寄存器”;
回声“;
回声“;
回声“;
回声“名字:”;
回声“;
回声“;
回声“;
回声“姓氏:”;
回声“;
回声“;
回声“;
回声“;
回声“;
没有任何特殊布局。你需要使用一个表格或CSS来对齐东西。你到底想要什么样的方式?我也不知道PHP在这里有什么关系。这看起来像是一个纯粹的HTML/CSS问题。为什么有for
属性,而输入没有匹配的id
s?@j08691我希望所有表单字段都在左侧,所有对齐的try\n都在每个echocho“”的末尾;回声“;呼应“清晰的形式”;回声“;我这样做是为了注册按钮和清除表单是这样对的是的,你是对的,它将两个按钮并排对齐如果它们解决了你的问题,你可能希望养成接受答案的习惯: