我一直做不出来,求高手帮忙
就是一个留言板的功能,使用数据库,点击留言之后输入数据库,然后跳转到查看留言的,我都实现不了,求代码我的数据库有name,email,title,datetime,content帮下忙

解决方案 »

  1.   

    这个没多复杂,这个看上一两天就能做出来了,PHP100里面有个视频教程就是讲做论坛的,相信那个会对你有帮助的
      

  2.   

    我做了下,代码如下,大家帮我看看,我无法把代码写入到数据库啊~~~
    lyb_check.jsp<%
      String username=request.getParameter("username");
      if(username!=null)
      username=new String(username.getBytes("ISO-8859-1"));
      String title=request.getParameter("title");
      if(title!=null)
      title=new String(title.getBytes("ISO-8859-1"));
       String content=request.getParameter("content");
      if(content!=null)
      content=new String(content.getBytes("ISO-8859-1"));
       String email=request.getParameter("email");
    %>
      <%
       try{
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         }
       catch(ClassNotFoundException e){}
       try {
          Connection con = DriverManager.getConnection("jdbc:odbc:banji");
          Statement sql=con.createStatement();
    if(username.equals("")||email.equals("")){%>
    <script>alert('用户名或者Email为空,请重新输入');window.location='lyy.jsp';</script>
    <% }
    else{
         
              String condition="insert into message values('"+username+"','"+email+"','"+title+"','"+content+"')";
              sql.executeUpdate(condition);
              session.setAttribute("register_sucsess","留言成功");%>
              <script>alert('留言成功,请查看');window.location='view_ly.jsp';</script>
              <% con.close();
          
    }
    %>

    <%
     
     
      }catch(SQLException e1){}
     %>我的数据库是message表的列分别是name,email,time(自动获取时间,默认getdate),title,content帮我看下哪里出错了,没报错,但是点了留言后,页面白了,然后没录入数据库