-4
我的MySQL数据库有两个表:‘Listing’
和‘country_id’
‘Country’
‘Country’
链接 '上市'
函数createrow()
在‘Listing’
中创建一个新行,这是通过使用下拉选择框的'Submit'
按钮完成的,然后将标题命令重定向到另一个页面。
出于某种原因,我不知道,如果表‘Country’
包含超过35条记录,我收到以下错误消息(35 ps的记录头命令重定向没有错误):
警告:不能修改头信息 - 已在第113行的C:\ xampp \ htdocs \ MySQLprtnr \ create.php中输出的头文件(输出在C:\ xampp \ htdocs \ MySQLprtnr \ create.php:101开始)
代码:
;
<input type="submit" name="Submit" value="Submit"></td>
</tr>
<?php
if (isset($_POST['Submit']))
{
$message = $_POST['message'];
$subject = $_POST['subject'];
$country_id = $_POST['country_id'];
createrow($message, $subject, $country_id);
header('Location: memberprofile.php');
}
?>
</form>
</table>
Line nu mbers:
线#101:<?php
线#113:'header('Location: memberprofile.php');'
我有以下两个问题:
- 为什么我收到上述错误消息解释呢?
- 因为我没有问题#1的解决方案,有没有另一种方式来重定向,而不是'header'`(也许使用Javascript)?
感谢您的任何援助,