求救,急急急!!此程序在linux下很正常,为何在windows下去不能正常运行
石头子 2003-05-31 05:03:49 <?php
$nameofdoc = "student_register.php";
include('common.inc');
require 'commonhtml.inc';
function print_putong_form(){
global $nameofdoc;
global $REMOTE_ADDR;
global $current_date;
?>
<br>
<br>
<SCRIPT LANGUAGE="Javascript">
<!--
function check() {
if(document.form1.student_name.value=="")
{
alert("未填写姓名!");
return false;}
else if( document.form1.student_password.value=="")
{
alert("未填写密码");
return false;}
else {
return true;
}
}
//-->
</SCRIPT>
<table align="center" border=0>
<tr>
<td align="center">
<form name="form1" ACTION="<?php echo "$nameofdoc"; ?>" METHOD="POST" enctype="multipart/form-data" onsubmit="return check()">
<p>请输入姓名:
<input type="text" name="student_name">
</p>
<p>请输入您的密码:
<input type="password" name="student_password">
</p>
<p>请输入您的班级:
<input type="text" name="class">
</p>
<p>请输入email地址:
<input type="text" name="emailaddress">
</p>
<p>
<INPUT TYPE="HIDDEN" NAME="student_form_done" VALUE="1">
<input type="submit" name="ok" value="确定">
<input type="reset" name="start" value="取消">
<input type="button" name="back" value="返回"
onclick=javascript:history.back()>
</p>
</form>
</td>
</tr>
</table>
<?
}
// require "footer.def.php";
if($student_form_done == "1"){
$sql_count= "SELECT count(*) ". "num" ." FROM student WHERE name ='$student_name' ";
$query_count= mysql_db_query($dbname, $sql_count, $id_link);
$nums= mysql_fetch_array($query_count);
if($nums["num"]>=1)
{
echo " 这个用户名已被使用!<a href=student_register.php>请换一个名字注册</a>";
}
else
{
$current_date=date('Y-m-d H:i:s');
//echo $student_form_done;
//echo $student_name.$class.$current_date.$emailaddress;
$sql_insert="insert into student values('','$student_name','$class','','','','','','$current_date','$emailaddress','$student_password')";
$result_insert=mysql_db_query($dbname,$sql_insert,$id_link);
if($result_insert)
{
echo "注册成功,请<a href=student_login.php>登陆</a>.";
//header("Location: student_choose.php");
//exit;
}
}
}
else{
common_html_header(1);
print_putong_form();
common_html_footer(1);
}
?>
此程序在linux下很正常,为何在windows下却不能正常的运行呢?---windows下只显示注册窗口,注册提交以后却不能显示登陆的窗口。如何解决此问题?????
急需解决!!!!!