一个perl处理表单连接数据库的例子,高手帮忙解释下
来源:百度知道 编辑:UC知道 时间:2024/06/18 08:31:33
表单程序我懂,不用太多解释,但是完全不懂perl,请尽量详细
貌似是一个连Access数据库的简单的留言板
表单:
<html><head></head><body>
<form action="cgi-bin/perlodbc.pl" method="get">
Name: <input type="text" size=15 name="name"><br>
emotion: <input type="text" size=15 name="emotion"><br>
content: <input type="text" size=15 name="contents">
<br>
<input type="submit"><br>
<input type="reset">
</body></html>
perl程序:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print<<eof;
<html>
<head>
<title>perl-access</title>
<meta http-equiv="Content-Type" content="text/html; char
貌似是一个连Access数据库的简单的留言板
表单:
<html><head></head><body>
<form action="cgi-bin/perlodbc.pl" method="get">
Name: <input type="text" size=15 name="name"><br>
emotion: <input type="text" size=15 name="emotion"><br>
content: <input type="text" size=15 name="contents">
<br>
<input type="submit"><br>
<input type="reset">
</body></html>
perl程序:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print<<eof;
<html>
<head>
<title>perl-access</title>
<meta http-equiv="Content-Type" content="text/html; char
什么年代了?还用perl?
建议还是需要看书理解,要不永远学不会
真不行这样理解
<html>的<head> “ /头” <body>
<form action="cgi-bin/perlodbc.pl" method="get">
名称: <input type="text" size=15 name="name"> <br>
情感: <input type="text" size=15 name="emotion"> <br>
内容: <input type="text" size=15 name="contents">
<br>
<input type="submit"> <br>
<input type="reset">
“ /机构” “ /的HTML ”
perl的程序:
# !是/ usr /斌/ perl的
打印“内容类型:文字/的HTML \ n \ n已” ;
打印“ ”的EOF ;
<html>
的<head>
的<title> perl的准入“ /标题”
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
“ /头”
<body&