Answer to Question #16717 in AJAX | JavaScript | HTML | PHP for bbb

Question #16717
<?PHP

session_start();
$type;
if(isset($_POST['username'],$_POST["Dname"])){
$username= $_POST['username'];
$password= $_POST["password"];


if($username&&$password)
{
$connect = mysql_connect("localhost","bayan","1234") or die("coudnt connect to database");
mysql_select_db("automated invigilation scheduler",$connect);

$query = mysql_query("SELECT * FROM login1 WHERE username='$username'");

$numrows= mysql_num_rows($query);
if($numrows!=0)
{
while($row= mysql_fetch_assoc($query))
{
$dbusername = $row['username'];
$dbpassword = $row['password'];
$dbtype = $row['type'];
}
if($username==$dbusername && $password==$dbpassword)
{


if($dbtype=="dhod"){
header ("location:dhod.php");
$_SESSION['username']=$dbusername;
$_SESSION['password']=$dbpassword;

}
elseif($dbtype=="HEAD OF EXAM COMMITTEE"){
header ("location:examcommittee.php");
$_SESSION['username']=$dbusername;
$_SESSION['password']=$dbpassword;

}
elseif($db
1
Expert's answer
2012-10-17T08:28:12-0400
Dear visitor
Unfortunately, the statement of your question is a bit confusing.
What do you need to be done? Please, give us the details so we could help you

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
17.10.12, 17:27

Unfortunately, your question requires a lot of work and cannot be done for free. Submit it with all requirements as an assignment to our control panel and we'll assist you.

bbb
17.10.12, 15:51

the problem is in my code i can't go to or redirect to exact pages which should be appear from home page by inserting the username ans password so could u please help i already sent the code via the email.

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS