hi,
I am working on a matrimonial website now i have to send a sample profile for every user, i want a unique profile to send to every user but unable to find how to do it.
here is my code what i did.
include("db.php");
$query="select * from matri_user_info where payment='Yes'";
$result=mysql_query($query,$con) or die("Mysql Error".mysql_error());
$data=mysql_num_rows($result);
$i=0;
while($i<$data)
{
$s1=mysql_result($result,$i,"reg_id");
$s2=mysql_result($result,$i,"email_id");
$s3=mysql_result($result,$i,"name");
$s4=mysql_result($result,$i,"ipd_religion");
$s5=mysql_result($result,$i,"ipd_Caste");
$s6=mysql_result($result,$i,"ipd_mother_tongue");
$s7=mysql_result($result,$i,"ipd_age");
$s8=mysql_result($result,$i,"ipd_age1");
$s9=mysql_result($result,$i,"ipd_height");
$s10=mysql_result($result,$i,"ipd_height1");
$s13=mysql_result($result,$i,"ipd_marital_status");
$where = array();
if (($s7 !="") && ($s8 !="")) {
$where[] = " and age BETWEEN $s7 AND $s8";
} else if ($agemin !="") {
$where[] = " and age >= $s7";
} else if ($agemax!="") {
$where[] = " and age <= $s8";
}
if (($s9 !="") && ($s10 !="")) {
$where[] = " and height BETWEEN $s9 AND $s10";
} else if ($hmin !="") {
$where[] = " and height >= $s9";
} else if ($hmax!="") {
$where[] = " and height <= $s10";
}
if ($s4 !="") {
$where[] = " and religion = '$s4'";
}
if ($s13 !="") {
$where[] = " and marital_status = '$s13'";
}
$query1 = "SELECT * FROM matri_user_info WHERE gender = 'Bride' AND status = 'unlock'" . join($where);
$result1=mysql_query($query1,$con) or die ("Mysql error".mysql_error());
$data1=mysql_num_rows($result1);
echo $data1;
$i1=0;
while($i1<$data1)
{
$r1=mysql_result($result,$i,"reg_id");
$r2=mysql_result($result,$i,"name");
$r3=mysql_result($result,$i,"age");
$r4=mysql_result($result,$i,"height");
$r5=mysql_result($result,$i,"religion");
$r6=mysql_result($result,$i,"education");
$r7=mysql_result($result,$i,"job");
$r8=mysql_result($result,$i,"dob");
$r9=mysql_result($result,$i,"candi_pic_1");
$i1++;
}
$i++;
}
What i want
1- pic one profile form data.
2- Check his preference and get value in data1.
3- Pic one profile among all in data1 and send to profile 1 of data.
4- Repeat loop till last. but every time this happen a unique profile should be sent.because i want only one profile will be send per day. so when next day when this loop will execute for profile 1 value from data1 should be change.
If any one of you have any idea or suggestion then please let me know how to do this.
thanks