请帮助我修复该错误。 解析错误:语法错误,第36行在/aaa/dsearch.php中出现意外的“ sonum”(T_STRING)
if(mysqli_num_rows($result) > 0)
{
while($row = mysqli_fetch_array($result))
{
$output .= '
<tr>
<td>'. $row["sonum"] .'</td>
<td>'. $row["regdate"] .'</td>
<td>'. $row["salesperson"] .'</td>
<td>'. $row["company"] .'</td>
<td>'. $row["status"] .'</td>
<td>
<a href="so.php?edit=<?php echo $row['sonum']; ?>" class="btn btn-info">Edit</a>
<a href="process.php?delete=<?php echo $row['sonum']; ?>" class="btn btn-danger" onclick="return confirm('Are you sure you want to delete this item?');">Delete</a>
</td>
</tr>
';
}
}
答案 0 :(得分:0)
您应在PHP字符串值内而不是HTML文本内包含PHP代码。例如,代替
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoappApplication {
public static void main(String[] args) {
SpringApplication.run(DemoappApplication.class, args);
}
}
您应该使用:
<a href="so.php?edit=<?php echo $row['sonum']; ?>" class="btn btn-info">Edit</a>