在php上的服务器上传期间出错

时间:2016-03-22 05:33:06

标签: php session

当我在服务器上传我的项目时,它显示错误session_start(): Cannot send session cookie - headers already sent by (output started at /home,mysql_connect():不推荐使用mysql扩展,将来会删除:使用mysqli或PDO代替,mysql_num_rows()需要参数1是资源,在/ home

中给出的布尔值



<?php
global $Username,$Password; 
session_start();
$_SESSION['Username']=$Username;
$_SESSION['Password']=$Password;
?>
<html>
<head>
</head>
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="mainlogfinal.css" />
<link rel="stylesheet" type="text/css" href="tablemain1.css" />
<body>
<table style="font-weight:bold;width:800px;margin-left:10px;margin-top:0px;margin-bottom:0px;">
<tr>
<td style="border:none;font-family:forte;color:#fc7805;font-size:64px;">MoovqA</td>
</tr>
</table>
<table style="width:800px;margin-left:10px;margin-top:-15;">
<tr>
<td style="border:none;font-family:forte;color:#fc7805;font-size:26px;">Move Ahead</td>
</tr>
</table>
<form method="POST">
<table style="width:900px;margin-left:119px;margin-top:150px;">
<tr>
<td style="margin:right:9px;border:none;">
<input type="text" name="Username" style="color:grey;font-size:15px;width:400px;height:40px;border:3px solid #fc7805;" value="Username" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Username';}" >
</td>
<td style="border:none;">
<input type="password" name="Password" style="color:grey;font-size:15px;width:400px;height:40px;border:3px solid #fc7805;" value="Password"onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Password';}" >
</td>
</tr>
</table>
<table style="width:252px;margin-left:755px">
<tr>
<td style="border:none;width:56px;">
<input type="checkbox" style="width:41px;height:15px;margin-left:10px;">
</td>
<?php  
include 'connect.php';
global $Username,$Password;
if(isset ($_POST["submit"]))
{
$Username = $_POST['Username'];
$Password = $_POST['Password'];
$isAdmin = mysql_query("SELECT Username FROM users WHERE Username='$Username' AND Password='$Password'");
if(mysql_num_rows($isAdmin)==1) {
header("Location:compcss.php"); //Or wherever your administration is
exit;
}
print_r = mysql_query("SELECT Username FROM company_info WHERE Username='$Username' AND Password='$Password'");
if(mysql_num_rows($result)==1) {
$_SESSION['Username']=$Username;
header("Location:memview3.php");
exit;
}
else{
echo "<p>The Username and Password you entered does not match</p>";
}
}
?>
<td style="color:grey;font-size:15px;border:none;">Keep me logged in </td></tr>
</table>
<table style="width:170px;margin-left:752px;">
<tr>
<td style="border:none;"><input type="submit" name="submit" value="Run" style="color: white;background:  #fc7805;width: 216px;height: 38px;border-top-width: 0px;border-right-width: 0px;padding-left: 0px; border-bottom-width: 0px;padding-right: 0px;border-left-width: 0px; font-size: 21px;">
</td></tr>
</table></form>
<table style="width: 225px;margin-left: 20px;margin-top:225px;">	
<tr><td style="border:none; font-size:13px;color:grey;">Vidhem Infotech <img src="images/c.gif" style="height:15px;width:15px;"> 2016.</td></tr>
</table>
</div>
<section id="sidebar" style="margin-left: 1106px;padding-right: 75.333px;padding-left: 48.333px;background:#fdbe87;">
<div class="inner">
<nav>
<ul>
<li style="width:160px;right:17px;"><a href="https://www.facebook.com/fitnesshealth08/?ref=aymt_homepage_panel" target="_blank"><img src="images/f1.png" style="width:30px;height:30px;margin-right:7px;"></a><img src="images/t1.png" style="width:30px;height:30px;margin-right:7px;"><img src="images/y1.png" style="width:30px;height:30px;margin-right:7px;"><img src="images/i1.png" style="width:30px;height:30px;"></li><br/><br/><br/><br/>
<li><button class="button button5" style="138px;margin-left:12px;font-size:20px;">Contact Us</button></li>
<li style="font-size:15px;font-weight:bold;color:#fc7805;margin-left:10px;margin-top:0px;text-align:center;">support@moovqa.com</li>
<li style=" left:0px;right:3px;font-size:15px;color:transparent;font-weight:bold;width:145px;margin-top:0px;text-align:center;">Time 9:00 - 18:00</li>
<li style=" font-size:15px;color:transparent;font-weight:bold;width:134px;left:0px;margin-top:0px;text-align:center;">0180 2658624 </li>
<li style="width:141px;font-weight:bold;font-size:15px;color:transparent;margin-left:0px; margin-top:0px; text-align:center;">715 L "Aashirwad"  </li>
<li style="font-size:15px;font-weight:bold;width:141px;color:transparent;margin-left:0px; margin-top:0px; text-align:center;">Model Town  </li>
<li style="font-size:15px;color:transparent;font-weight:bold;width:143px;margin-left:0px; margin-top:0px; text-align:center;">Panipat-132103 </li>
<li style="font-size:15px;color:transparent;margin-left:10px;margin-top:0px;text-align:center;">info@moovqa.com</li>
<li style=" font-size:15px;color:transparent;width:134px;left:0px;margin-top:0px;text-align:center;">0180 2658624 </li>
<li style=" left:0px;right:3px;font-size:15px;color:transparent;width:145px;margin-top:0px;text-align:center;">Time 9:00 - 18:00</li>
<li></li>
</div></section>
</body>
</html>
&#13;
&#13;
&#13;

`

0 个答案:

没有答案