我创建了一个HTML表单,该表单将变量传递给exec_shell
。一切正常,直到我将CSS添加到HTML页面。新的HTML + CSS代码不会将变量传递给php shell_exec
。
(工作之前):
<body>
<form action="adduser.php" method="post">
Server: <input type="text" value="<?php echo $name; ?>" name="name"><br>
Password: <input type="text" value="<?php echo $password; ?>" name="password"><br>
<input type="submit">
</form>
</body>
之后(不起作用):
<form action="adduser.php" method="post" class="contact3-form validate-form">
<span class="contact3-form-title">
Title
</span>
<div class="wrap-input3 validate-input" data-validate="Server Name is required">
<input class="input3" type="text" value="<?php echo $hosts; ?>" name="hosts" placeholder="Server Name or Server Group">
<span class="focus-input3"></span>
</div>
<div class="wrap-input3 validate-input" data-validate = "Valid Password is required">
<input class="input3" type="text" value="<?php echo $password; ?>" name="password" placeholder="Your Password">
<span class="focus-input3"></span>
</div>
<div class="container-contact3-form-btn">
<button class="contact3-form-btn">
Submit
</button>
</div>
</form>
我也尝试过:
value="<' . $hosts .'"
比HTML有更好的方法吗?
谢谢。
答案 0 :(得分:0)
您的按钮没有type =“ submit”