<html>
<head>
<title>发言</title>
</head>
<body>
<?php
if($words)
{
$link_ID=mysql_connect("192.168.0.100","root","***");
mysql_select_db("play");
$time = date('y-m-d H:i:s');
echo "$time";
$str = "insert into chat(nick,time,words) values('$nick','$time','$words')";
mysql_query("$str",$link_ID);
mysql_close($link_ID);
}
?>
<form action="speak.php" method="get" target="_self">
<input type="text" name="words" cols="20">
<input type="submit" value="发言">
</form><form action="login.php" method="post" name="form1" target="_parent">
<input type="submit" name="Submit" value="重新登录">
</form>
</body>
</html>
---------------------------
有问题,我觉着没有问题,因为在有的机子上能运行,成功操作了。
但在我的机子上就是不成功。每次点“发言”后,内容不能增加到数据库里
<head>
<title>发言</title>
</head>
<body>
<?php
if($words)
{
$link_ID=mysql_connect("192.168.0.100","root","***");
mysql_select_db("play");
$time = date('y-m-d H:i:s');
echo "$time";
$str = "insert into chat(nick,time,words) values('$nick','$time','$words')";
mysql_query("$str",$link_ID);
mysql_close($link_ID);
}
?>
<form action="speak.php" method="get" target="_self">
<input type="text" name="words" cols="20">
<input type="submit" value="发言">
</form><form action="login.php" method="post" name="form1" target="_parent">
<input type="submit" name="Submit" value="重新登录">
</form>
</body>
</html>
---------------------------
有问题,我觉着没有问题,因为在有的机子上能运行,成功操作了。
但在我的机子上就是不成功。每次点“发言”后,内容不能增加到数据库里
解决方案 »
- 如何学习php?
- 一道笔试题,高手请进
- Fatal error: Only variables can be passed by reference in
- smarty 与fckeditor 相互结合更新问题,大家帮助我看下
- PHP有什么好的grid 和 分页插件
- 没有人知道吗?当找不到页面时候,如何给出自己定义的出错提示
- 在Apache2.043(Win2K Server)上怎么也装不上PHP4.2.3,救救我吧!
- 关于session的几个问题
- PHPMailer发邮件MsgHTML(eregi_replace("[\]",'',$body);为什么要替换掉\,如果不替换有什么情况么
- SQL显示不正常
- url重写 .htaccess 的问题, 跪求高手帮忙
- 请问各位高手,如何用PHP创建RSS?(我已经没分了,感激不尽)!
我在php.ini里已经将register_global设为ON了,重启apche还是不行,
后来在程序前加了extract($_GET[])和extract($_POST) 就可以了。
郁闷。