t($p);?>">
<br>
正文(必填): <br>
<textarea name="zw" cols="50" rows="10"></textarea>
<input type="submit" name="Submit" value="提 交">
</form>
</tr></table></center>
<hr>
<center>自用论坛程序0.25版 设计工具:PHP+MYSQL<br>
<a href=mailto:fhl@cgi.hnpts.ha.cn>古钺青剑</a> 制作<br><a href=http://www.fhlfox.dhs.org>逍遥飞狐多媒体作坊</a> 2000 </center>
</span>
</body>
</html>
addnew.php:
<?$m=mysql_connect("localhost","×××","×××××");
mysql_select_db("×××××",$m);
$zw=ereg_replace("<","<",$zw);
$zw=ereg_replace(">",">",$zw);
$zw=ereg_replace("n","<br>",$zw);
$zw=ereg_replace(" "," ",$zw);
$tt=ereg_replace("<","<",$tt);
$tt=ereg_replace(">",">",$tt);
if ($nm=="") $nm="无名宝";
if ($em=="") {$nm.="<-- 是一只没有MAIL的菜鸟";$em="No";}
$err=strlen($tt)*strlen($zw);
if ($err==0)
$msg="<font color=red>不要偷懒嘛!把表格填完再提交不迟。</font>";
else {$q="insert into yxforum (dt,tp,ct,fl,ip,un,em,num) values"
."(now(),"".$tt."","".$zw."",".$fl.","".$REMOTE_ADDR."","".$nm."","".$em."",0)";
mysql_query($q,$m);
$q="select num,fl from yxforum where id=".$fl;
$fl_a=$fl;
do { $mr=mysql_query($q,$m);
$ra=mysql_fetch_row($mr);
$num=$ra[0]+1;
$q="update yxforum set dt=now(),num=".$num." where id=".$fl;
$fl=$ra[1];
mysql_query($q,$m);
$q="select num,fl from yxforum where id=".$fl;
} while ($fl>0);
$msg="<font color=green>你的意见已经成功提交!</font>";
}
?>
<html>
<head>
<script language="Javascript">
function go()
{document.location="index.php?fl=<?print($fl_a);?>&p=<?print($p)?>";
}
</script>
<body onload="setTimeout('go()',3000);">
<?print($msg);?><br>
系统将在3秒钟以后自动返回。如果不能返回或者你着急,请按<a href=index.php?fl=<?print($fl_a);?>&p=<?print($p)?>>这里</a>
</body>
上一页 [1] [2]