<?php
@session_start();
include('inc/conn.php');
$str=$_GET['str1'];
$strs=explode("|",$str);

$guestuser=$strs[1];
$guestpwd=$strs[0];

//$guestuser=$_GET['str2'];
//$guestpwd=$_GET['str1'];

     if($guestuser=='' || $guestpwd==''){
          echo "<script type=\"text/javascript\">window.location.href=\"login.php\";</script>";
     }
         $sql="select * from guestuser where guestusername='".$guestuser."' and guestpwd='".$guestpwd."'";
         $result=mysql_query($sql);
	     $count=mysql_num_rows($result);
    if($count<>0){
	    $_SESSION['etwguestuser']=$guestuser;
          echo "<script type=\"text/javascript\">window.location.href=\"index.php\";</script>";	
	}else{
          echo "<script type=\"text/javascript\">window.location.href=\"login.php\";</script>";
	}
?>