<?php

	include "library.php";

	$cxn = start_code();

	if (val( $_GET, 'country' ) != "")
		$curr_country = val( $_GET, 'country' );
	else
		$curr_country = "";
	
	$_SESSION['min_age'] = 			val( $_POST, 'min_age' );
	$_SESSION['max_age'] = 			val( $_POST, 'max_age' );
	$_SESSION['search_for'] = 		val( $_POST, 'search_for' );
	$_SESSION['sex'] = 				val( $_POST, "sex" );
	$_SESSION['sex_wanted'] = 		val( $_POST, "sex_wanted" );
	$_SESSION['city'] = 			val( $_POST, 'city' );
	$_SESSION['state'] = 			val( $_POST, 'state' );
	$_SESSION['country'] = 			val( $_POST, 'country' );
	$_SESSION['search_for_word'] = 	val( $_POST, 'search_for_word' );
	$_SESSION['compatability'] = 	val( $_POST, 'compatability' );
	$_SESSION['logged_on'] = 		val( $_POST, 'logged_on' );

	if (val( $_POST, "screen_width" ) != "")
	{
		log_screen_size( $_POST['screen_width'], $_POST['screen_height'], $cxn );

		$_SESSION['screen_height'] = $_POST['screen_height'];
	}

	if (val( $_POST, "came_from_search" ) == "yes" )
		log_javascript( val( $_POST, "has_javascript" ), $cxn );

		/* must happen before print output */
		
	jump_to_page( "view_profiles.php", "startpos", "0", "country", rawurlencode( $curr_country ) );
?>
