【php开源代码栏目提醒】:网学会员在php开源代码频道为大家收集整理了insert_colleague.php提供大家参考,希望对大家有所帮助!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/style.css">
<title>无标题
文档</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<script language="javascript">
function checkit(){
if(form1.colleague_name.value==""){
alert("请输入!");
form1.colleague_name.select();
return(false);
}
if(form1.colleague_tel.value==""){
alert("请输入电话号码!");
form1.colleague_tel.select();
return(false);
}
if(form1.colleague_mail.value==""){
alert("请输入邮箱地址!");
form1.colleague_mail.select();
return(false);
}
if(form1.colleague_birthday.value==""){
alert("请输入生日!");
form1.colleague_birthday.select();
return(false);
}
return(true);
}
</script>
<body>
<table width="440" height="219" border="0" align="center" cellpadding="0" cellspacing="0" background="images/bg_36.gif">
<tr>
<td height="40" colspan="2" align="left"> <span class="STYLE33">同事信息添加</span></td>
</tr>
<form name="form1" method="post" action="insert_colleague_ok.php" onSubmit="javascript: return checkit()">
<tr>
<td width="104" height="22" align="center"></td>
<td width="336"><input name="colleague_name" type="text" id="colleague_name" size="25"></td>
</tr>
<tr>
<td height="22" align="center">电话</td>
<td><input name="colleague_tel" type="text" id="colleague_tel" size="28" maxlength="20">
*</td>
</tr>
<tr>
<td height="22" align="center">邮箱</td>
<td><input name="colleague_mail" type="text" id="colleague_mail" size="28" maxlength="20">
*</td>
</tr>
<tr>
<td height="22" align="center">生日</td>
<td><input name="colleague_birthday" type="text" id="colleague_birthday" size="15" maxlength="20">
*(例如:1-1)</td>
</tr>
<tr>
<td height="22" align="center">地址</td>
<td><input name="colleague_address" type="text" id="colleague_address" size="40" maxlength="20"></td>
</tr>
<tr>
<td height="22" align="center">类别</td>
<td><input name="colleague_category" type="text" id="colleague_category" size="28" maxlength="20"></td>
</tr>
<tr>
<td height="30"> </td>
<td><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置"></td>
</tr>
<tr>
<td height="17"> </td>
<td> </td>
</tr>
</form>
</table>
</body>
</html>