rinki
Joined: 09 Sep 2009
Posts: 1
|
| Posted: Wed Sep 09, 2009 1:55 am My search page |
|
|
I know almost nothing about web design. So I will need very clear help.
In my site 20 profiles comes when one "search"es, but for Next profile if one clicks on NEXT, it shows errors.
url is http://localmatrimonials.com/search_result.php
and php page is
Code:
<?php
include"include/connect.php";
include"include/pagination.php";
//session_start();
//echo $_SESSION['status'];exit;
/*session_start();
//|| !isset($_SESSION['uname'])
For the time being I changed the display from 20 to 30. What is the REAL SOLUTION?? :cry: :cry:
Any guidance will be higly appreciated.
if($_SESSION['uname']=="" )
{
header("Location:index.php");
exit;
}*/
$age_from=$_REQUEST['age_from'];
$age_to=$_REQUEST['age_to'];
$country=$_REQUEST['country'];
$state=$_REQUEST['state'];
$religion=$_REQUEST['religion'];
$part_sex=$_REQUEST['part_sex'];
$mat=$_REQUEST['mat'];
if($age_from=="" || $age_to=="" || $country=="" || $state=="" || $religion=="" || $part_sex=="" )
{
header("Location:index.php");
exit;
}
$query='&age_from='.$_REQUEST['age_from'].'&age_to='.$_REQUEST['age_to'].'&country='.$_REQUEST['country'].'&state='.$_REQUEST['state'].'&religion='.$_REQUEST['religion'].'&part_sex='.$_REQUEST['part_sex'];
$where=" WHERE ";
if ($state=="all")
$where.="";
else
$where.=" ad.state='".$state." ' AND";
if ($country=="all")
$where.="";
else
$where.=" ad.country='".$country." ' AND";
if ($religion=="all")
$where.="";
else
$where.=" ad.religion='".$religion." ' AND";
if ($age_from=="all" || $age_to=="all")
$age="";
else
$age="and pi.age between '".$age_from."' AND '".$age_to."'";
if($_REQUEST['pagination']=="true")
{
$first=$_REQUEST['first'];
$last=$_REQUEST['last'];
}
else
{
$first=0;
$last=2;
}
//and ad.dist='$state'
//$sql=mysql_query("SELECT us.user, pi.id, pi.name, pi.mobile, pi.email, pa.sex,pa.m_tounge, pi.age, ad.country, ad.dist, pas.religion, img.image from perso_info pi, perso_attri pa, address ad, perso_astro pas, image img, user us where ad.country='$country' ".$s." and pas.religion='$religion' and pi.id=ad.id and pi.id=ad.id and pi.id=pas.id and pi.id=pa.id and pa.sex='$part_sex' and pi.id=us.id and us.user=img.user and pi.age between '$age_from' and '$age_to' LIMIT ".$first.", ".$last);
$sql1=mysql_query("SELECT us.user, pi.id, pi.name, pi.mobile, pi.email, pa.sex,pa.m_tounge, pi.age, ad.country, ad.dist, pas.religion, img.image from perso_info pi, perso_attri pa, address ad, perso_astro pas, image img, user us ".$where." pi.id=ad.id AND pi.id=ad.id and pi.id=pas.id and pi.id=pa.id and pa.sex='$part_sex' and pi.id=us.id and us.user=img.user ".$age);
$count=mysql_num_rows($sql1);
$pager = new pager(
$count , /*see above*/
30 , /*how many records to display at one time*/
$_REQUEST['_p'] /*this is the current page no carried via _GET*/
) ;
$pager->set_range(10);
$q = mysql_query("SELECT us.user, us.mat, pi.id, pi.name, pi.mobile, pi.email, pa.sex,pa.m_tounge, pi.age, ad.country, ad.dist, pas.religion, img.image from perso_info pi, perso_attri pa, address ad, perso_astro pas, image img, user us ".$where." pi.id=ad.id and pi.id=ad.id and pi.id=pas.id and pi.id=pa.id and pa.sex='$part_sex' and pi.id=us.id and mat='$mat' and us.user=img.user ".$age." LIMIT ".$pager->get_limit());
if(($count%2)==0)
{
$j=($count/2);
}
else
{
$j=($count/2)+1;
}
?>
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search Your Partner Today</title>
<link href="style1.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {
font-family: "comic Sans MS";
color: #bb0504;
font-size: 24px;
font-weight: bold;
}
.style3 {
color: #bb0504;
font-size: 15px;
font-family: "comic Sans MS";
font-weight: bold;
}
.style3 a{
color: #bb0504;
text-decoration:underline;
}
.style3 a:hover{
color: #bb0504;
text-decoration:none;
}
.overflow {
height:200px;
width:550px;
padding:10px;
overflow:auto;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
border:1px solid #333333;
}
.overflow img{
border:1px solid #666666;
}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<div align="center">
<table width="951" height="506" border="0" cellpadding="0" cellspacing="0" bgcolor="#930302" style="background-image:url(images/header_banner.jpg); background-position:top; background-repeat:repeat-x">
<tr>
<td height="200"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','951','height','200','src','flash/headeranimation','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/headeranimation' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="951" height="200">
<param name="movie" value="flash/headeranimation.swf" />
<param name="quality" value="high" />
<embed src="flash/headeranimation.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="951" height="200"></embed>
</object></noscript></td>
</tr>
<tr>
<td height="202" align="left" valign="top" style="padding-left:27px; padding-right:27px; background-image:url(images/middle_bg.gif); background-position:bottom; background-repeat:repeat-x"><table width="875" cellspacing="0" cellpadding="0" style="border:1px solid #969495; padding-left:8px; padding-right:8px; background-color:#FFFFFF">
<tr><td valign="top">
<table width="875" height="65" class="buttonHeader">
<tr>
<td width="146" align="center" class="buttonsText"><a href="index.php">Home</a></td>
<td width="146" align="center" class="buttonsText"><a href="#">Photo Gallery</a></td>
<td width="146" align="center" class="buttonsText">
<?php
if($_SESSION['uname']=="")
{
?>
<a href="create_profile.php">Registration</a>
<?php
}
else
{
?>
<a href="update_profile.php?profile=update&id=<?php echo $_SESSION['id']; ?>">Edit Profile</a>
<?php
}
?>
</td>
<td width="146" align="center" class="buttonsText"><a href="#">Succes Stories</a></td>
<td width="146" align="center" class="buttonsText"><a href="advertisement.php">Advertisement</a></td>
<td width="146" align="center" class="buttonsText"><a href="contact.php">Contact Us</a></td>
</tr>
</table>
</td></tr>
<br />
<p align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-7406837583541640";
/* 728x90, created 9/1/09 */
google_ad_slot = "4339105889";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<tr>
<td height="126" align="left" valign="top" style="padding-left:8px; padding-right:8px"><p><span class="style1">Welcome!</span><span class="bodyTextV"><br />
India’s premier matrimonial service portal. Here we provide an opportunity to our clientele to meet their life partner from their LOCALITY or from other corner of the PLANET.</span></p>
<table width="100%" border="0" cellspacing="2" cellpadding="2" >
<tr>
<td colspan="2" align="right"><span class="style3">
<?php
echo $pager->get_prev('<a href="{LINK_HREF}'.$query.'">Prev</a>');
echo " ";
echo $pager->get_next('<a href="{LINK_HREF}'.$query.'">Next</a>');
?>
</span></td>
</tr>
<tr>
<?php
$c=1;
while($row=mysql_fetch_array($q))
{
?>
<td width="50%"><table width="421" border="0" cellspacing="2" cellpadding="2" style="background-color:#F4E0CC; border:1px solid #666666" >
<tr>
<td width="28%" align="center"><a href="user_view.php?user=view&id=<?php echo $row['id']; ?>">
<?php
if($row['image']=="")
{
if($row['sex']=="m")
$image_now="images/male_image.jpg";
else
$image_now="images/lady_image.jpg";
}
else
$image_now=$row['image'];
?>
<img src="<?php echo $image_now;?>"
<?php
//width and height fixing
list($width,$height)=getimagesize($image_now);
$ratio=$height/$width;
if($height>$width)
{
echo "height=\"150\" width=\"".(150/$ratio)."\"";
}
elseif($height<$width)
{
echo "height=\"".(132*$ratio)."\" width=\"132\"";
}
?>
border="1" style="border:1px solid #993300; padding:2px" /></a></td>
<td width="72%" valign="top" class="bodyTextV">Name: <a href="user_view.php?user=view&id=<?php echo $row['id']; ?>"><?php echo $row['name']; ?></a><br />
Sex:<?php echo $row['sex']; ?> <br />
Religion: <?php echo $row['religion']; ?><br />
Mother Tounge: <?php echo $row['m_tounge']; ?><br />
<br />
<br />
<?php
if($_SESSION['status']==1 || $row['mat']=="dating" )
{
?>
Contact: <?php echo $row['mobile']; ?><br />
City: <?php echo $row['dist']; ?><br />
Country: <?php echo $row['country']; ?>
<?php
}
else
{
?>
Hi, Guest, You can not access all the contact information as you are not a registered member.<br /><strong>CONTACT ADMINISTRATOR at +919435700934 or +919862590295 for Phone NUMBER/s <br />
<?php
}
?>
</td>
</tr>
</table></td>
<?php
if(($c%2)==0)
{ ?>
</tr>
<tr>
<?php
}
$c++;
}
?>
</tr>
<tr>
<td colspan="2" align="right"><span class="style3">
<?php
echo $pager->get_prev('<a href="{LINK_HREF}'.$query.'">Prev</a>');
echo " ";
echo $pager->get_next('<a href="{LINK_HREF}'.$query.'">Next</a>');
?>
</span></td>
</tr>
</table>
<p><span class="bodyTextV"><br />
</span><span class="bodyTextV"><br />
</span></p></td>
</tr>
</table></td>
</tr>
<tr>
<td height="82" valign="top" style="background-image:url(images/footer_bg.gif); background-repeat:no-repeat
; padding-left:27px; padding-right:27px; padding-top:10px; ">
<!--hit counter code here-->
<!--hit counter ends-->
<span class="footerText"><a href="#">HOME PAGE</a> | <a href="#">PHOTO GALLERY</a> | <a href="#">ADD PROFILE</a> | <a href="#">SUCCESS STORIES</a> | <a href="#">ADVERTISEMENT</a> | <a href="#">CONTACT US</a> | <a href="#">FAQs</a></span>
<p align="center">
<span class="footerText">Copyright 2008-2018 @ localmatrimonials.com. All rights reserved.<br />
Powered by Alpana & Neeladitya Dhar.<br />
</span>
</p>
</td>
</tr>
</table>
</div>
</body>
</html> |
|