Php 为什么它重定向错误
我有一张表格:Php 为什么它重定向错误,php,html,redirect,uri,Php,Html,Redirect,Uri,我有一张表格: $html.='<div class="grid-round"> <form method="post action=""> <table class="grid-table"> <tr> <th><input type="checkbox" ></th>
$html.='<div class="grid-round">
<form method="post action="">
<table class="grid-table">
<tr>
<th><input type="checkbox" ></th>
<th>name</th>
<th>type</th>
<th>date</th>
<th>Stat</th>
</tr>
...
</table>
<button>save</button>
</form>
</div>';
$html.='
在method=“post
之后添加报价:
$html.='<div class="grid-round">
<form method="post" action="">
$html.='
在$后面缺少下划线,在post后面缺少双引号
尝试:
echo'
......
......
......';
post
.Typo之后,您错过了结束报价。如果您不想提交页面,您可以在按钮中添加“type=”button“,否则按钮将始终提交给您的操作link@Bart你说得对,谢谢
echo '<form method="post" action="'.$_SERVER['REQUEST_URI'].'" >
......
......
......';