Exemplo n.º 1
0
        if ($_GET['mode'] == 'search') {
            $result = searchPost(array($_GET['major'], $_GET['company'], $_GET['job_type']));
            $targetstring = "(";
            foreach ($result as $key => $value) {
                $targetstring = $targetstring . $value["postid"] . ',';
            }
            if (count($result) == 0) {
                echo "<h5>Sorry, didn't find any result :(</h5>";
            } else {
                $targetstring[strlen($targetstring) - 1] = ')';
                $res_data = sql_get_post_by_ids($targetstring);
                Print_Post($res_data);
            }
        }
    } else {
        Display_all_query();
    }
}
?>

</div>
<div class="col-xs-6 col-md-4">
  	<ul class="list-group">


<?php 
$conn = getconn();
$stmt = $conn->prepare("select * from student where email = :myemail;");
$stmt->bindParam(":myemail", $myemail);
$result = $stmt->execute();
if (!$result) {
Exemplo n.º 2
0
				$targetstring = $targetstring.$value["postid"].',';
			}

			if (count($result) == 0) {
				echo "<h5>Sorry, didn't find any result :(</h5>";
			}
			else {
				$targetstring[strlen($targetstring) - 1] = ')';
				$res_data = sql_get_post_by_ids($targetstring);
				Print_Post($res_data,$myemail,0);
			}			
		}
	}
	else
	{*/
Display_all_query($myemail);
//}
?>
</form>
</div>
<div class="col-xs-6 col-md-4">
<?php 
/*$conn = getconn();
	if($_SESSION["type"]=="stu")
		$stmt = $conn->prepare("select * from student where email = :myemail;");
	else
		$stmt = $conn->prepare("select * from employer where email = :myemail;");
	$stmt->bindParam(":myemail",$myemail);
	$result = $stmt->execute();
	if (!$result)
    {