Sunday, 17 May 2015

code.php

<?php
session_start();
?>

<?php
$a=$_POST['txtuid'];
$b=$_POST['txtupass'];
if(strcmp($a,"admin")==0||strcmp($b,"admin")==0)
{

include("admin2.php");

}
else
{
$val=0;
$con=mysql_connect("localhost","root","");
  if(!$con)
  {
  die("error is" .mysql_error());
}
else
{
mysql_select_db("login1",$con);
$result=mysql_query("select * from user3 where email='$a' and password='$b'");

if($row=mysql_fetch_array($result))
{
$val=1;
}
if($val!=1)
{
echo "kkpppppppppppppppppppppppppppppppppppppppppppp";
include "x.php";
die("");
}
else
{
$_SESSION['userid']=$a;
include "welcome.php";

}

}
}

?>
</body>
</html>

This entry was posted in :

0 comments:

Post a Comment