易截截图软件、单文件、免安装、纯绿色、仅160KB

第一个php程序,留言板

一波三折啊,老是忘记打单词
<body bgcolor="#0080FF"" >
<form action="bbs.php" method="post" name="Form">
<table border=0 cellpadding=2 cellspacing=0 >
<tr>
    <td align=right>名字:</td>
    <td><input type=text size=40 name=Ename value='' maxlength=50 ></td></tr>
<tr>
    <td align=right>Email:</td><td><input type=text size=40 name=email value='' maxlength=100 ></td>
</tr>
<tr>
    <td valign=top  align=right>留言:</td>
    <td><textarea name=content rows=4 cols=40 wrap=virtual></textarea></td>
</tr>
<tr>
   
    <td>  </td><td><div align="center">
        <input type=submit  value='添加'>&nbsp;
        <input type=reset  value='清除'>&nbsp;
    </div>
       
    </td>
</tr>
<tr>
    <td></td>
    <td>&nbsp;</td>
</tr>
</table>
<br>
<?php
//连接数据库
$link=mysql_connect('localhost' , 'root' , '');
if (!$link)
{
    die('Could not connect:'.mysql_error());
}
mysql_select_db("bbs");
//判断姓名是否为空
if(!empty($_POST['Ename']))
{
    $Ename=($_POST['Ename']);
    $email=($_POST['email']);
    $content=($_POST['content']); //content就是内容的意思
    $PostDate=getdate();
    //定义数据到bbs表的SQL字符串
    $SQL="insert into bbs(Ename,email,content,postDate) values('$Ename','$email','$content',Now());";
    //执行插入语句
    mysql


相关文档:

php jquery 上传照片,上传后实时本页面预览

其实这个的主要部分并不是一个jquery,但是必须使用到
php程序部分,也只需要这个一个php程序就可以了
www.corange.cn亲测
<?php
header("Content-Type: text/html; charset=utf-8");
@header( "Cache-Control: no-cache, must-revalidate" );
@header( "Pragma: no-cache" );
@header( "Last-Modified: " ......

推荐:yahoo的php面试题

呵呵,翻译了篇东西,N长时间没用英语了,出了丑大家可一定要指出来啊。翻译自:Nick Halstead's Blog
A friend recently got some pre-interview questions from YAHOO for a PHP
job. Following up my previous post about programmer questions I
thought I would post them to give people examples of what a ......

PHP面向对象分析设计的61条军规

PHP面向对象分析设计的61条军规
你不必严格遵守这些原则,违背它们也不会被处以宗教刑罚。但你应当把这些原则看成警铃,若违背了其中的一条,那么警铃就会响起 。 ----- Arthur J.Riel
(1)所有数据都应该隐藏在所在的类的内部。
(2)类的使用者必须依赖类的共有接口,但类不能依赖它的使用者。
(3)尽量减少类的协议中 ......

最令PHP初学者头痛的十四个问题


【1】页面之间无法传递变量 get,post,session在最新的php版本中自动全局变量是关闭的,所以要从上一页面取得提
交过来得变量要使用$_GET['foo'],$_POST['foo'],$_SESSION['foo']来得到。当然也可以修改自动全局变量为开
(php.ini改为register_globals = On);考虑到兼容性,还是强迫自己熟悉新的写法比较好。
  【2 ......

php 手机下载 POST 类

由于最近在与SP合作,开发手机业务下载,数据提交采用POST方式提交,现与大家分亨比较成熟类.
function uc_api_post($url, $action, $sendmsg='') {
$postdata = "corpMsg=$sendmsg";
return uc_fopen(UC_URL, 500000, $postdata, '', TRUE, UC_IP, 20);
}
function uc_fopen($url, $limit = 0, $post = '', $cookie = ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号