我想将php值发送到cgi url
<form method="post" action="https://192.168.10.1:10443/cgi-bin/outgoingfw.cgi/cgi-bin/outgoingfw.cgi" style="float:left">
<input name="ACTION" value="disable" type="hidden">
<input name="line" value="0" type="hidden">
</form>
我希望将这些值与PHP POST请求一起发送到url
任何人都可以帮我解决这个问题。
答案 0 :(得分:0)
您缺少提交按钮
<form action="https://192.168.10.1:10443/cgi-bin/outgoingfw.cgi/cgi-bin/outgoingfw.cgi" method="POST">
<input type="submit" value="Publish">
<input name="ACTION" value="disable" type="hidden">
<input name="line" value="0" type="hidden">
</form>
答案 1 :(得分:0)
只需添加“提交”按钮即可。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form method="post" action="https://192.168.10.1:10443/cgi-bin/outgoingfw.cgi" style="float:left">
<input name="ACTION" value="disable" type="hidden">
<input name="line" value="0" type="hidden">
<!-- submit button -->
<input type="submit" value="submit"/>
</form>
</body>
</html>
答案 2 :(得分:0)
如果您想自动发送。没有按下按钮。否则,你为什么需要隐藏的字段?
<form method="post" action="https://192.168.10.1:10443/cgi-bin/outgoingfw.cgi/cgi-bin/outgoingfw.cgi" style="float:left">
<input name="ACTION" value="disable" type="hidden">
<input name="line" value="0" type="hidden">
</form>
<script>
document.getElementsByTagName('form')[0].submit();
</script>
答案 3 :(得分:-1)