Jongens heb even wat hulp nodig:
In mijn profielen zoek pagina laat de script: maar enkele resultaten zien. 6 dus
Klik ik op een pijltje voor de volgende: Dan laat hij een blanco pagina zien. Iemand een idee?
Dit is de search-results.php bestand:<?php
/* File Name : search-results.php
* Description : search-results page will show profile search result.
*/

error_reporting( 0 );

require_once('include/universal.php');
require_once('include/session.php');

$gender = cleanInput($_GET['gender']);
$looking_for = cleanInput($_GET['gendersearch']);
$age_from = cleanInput($_GET['agestart']);
$age_to = cleanInput($_GET['ageend']);
$area = cleanInput($_GET['area_list']);

if( isset( $_GET['profile_keyword'] ))
{
if( strstr( $_GET['profile_keyword'], '<' ) || strstr( $_GET['profile_keyword'], '>' ))
die('');
}

$profile_keyword = cleanInput( $_GET['profile_keyword'] );

if( is_array( $gender )
|| is_array( $looking_for )
|| is_array( $age_from )
|| is_array( $age_to )
|| is_array( $area )
|| is_array( $profile_keyword )
|| !is_numeric( $age_from )
|| !is_numeric( $age_to ))
die('');

if( $gender != 'male' && $gender != 'female' )
die('');

if( $looking_for != 'male' && $looking_for != 'female' )
die('');

if ($_GET['page']>0){
$gender = cleanInput($_SESSION['gender']);
$looking_for = cleanInput($_SESSION['looking_for']);
$age_from = cleanInput($_SESSION['age_from']);
$age_to = cleanInput($_SESSION['age_to']);
$area = cleanInput($_SESSION['area']);
$profile_keyword = cleanInput($_SESSION['profile_keyword']);
}else {
$_SESSION['gender'] = $gender;
$_SESSION['looking_for'] = $looking_for;
$_SESSION['age_from'] = $age_from;
$_SESSION['age_to'] = $age_to;
$_SESSION['area'] = $area;
$_SESSION['profile_keyword'] = $profile_keyword;

}

$search_query = "SELECT * from member,member_info where ";

//------------ seaching gender ----------------//
if ($looking_for=="male" ){
$search_query .=" sex = 'Male' and ";
}else if ($looking_for=="female") {
$search_query .=" sex = 'Female' and ";
}else {
//search any male or female
}

//------------ seaching for specified age ----------------//
if ($age_to!="" and $age_from!="" ){
$search_query .=" age>=".$age_from ." and age<=".$age_to." and ";
}

//------------ seaching for specific area ----------------//
if ($area !="empty" ){
$search_query .=" member_info.area ='".$area ."' and ";
}

if ($_SESSION['profile_type']=="member" or $_SESSION['profile_type']=="friend" ){ //hiding the current profile and friend's profiles
$search_query .=" member.id !=".cleanInput($_SESSION['memberid'])." and ";
}

//------------ seaching for specified profile description ----------------//
if ($profile_keyword!="" ){
$search_query .=" ( member_description like '%".$profile_keyword ."%' or firstname like '%".$profile_keyword ."%' or surname like '%".$profile_keyword ."%') and ";
}


$search_query .=" member.id=member_info.member_id and is_completed='Yes' and (status='status2' or status='status3') ORDER BY member.age ASC";
//echo ( $search_query);
define('TEXT_DISPLAY', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> Profiles)');
$manufacturers_split = new splitPageResults(cleanInput($_GET['page']), $search_query, $manufacturers_query_numrows,6);
$search_qs = db_query($search_query);
$search_count = db_getcount($search_qs);

include(Template::getPath());
?>
Ger van Steenderen op 17/10/2012 18:36:52

<?php
define('TEXT_DISPLAY', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> Profiles)');
//vervangen door:
$text_display = 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> Profiles)';
?>

Met define creƫer je een constante.


Jongens bedankt voor jullie reactie en tips.
Bovenstaande heeft trouwens ook niet geholpen.
Ik krijg een database foutmelding. Er kan geen verbinding worden gemaakt.

Reageren