Jump to content
Sign in to follow this  
anand.arjunan

image not visible

Recommended Posts

Hi all i Have upload the image and rename the image but the image not shown what is the error please help meSee my coding<?php $path=$_SERVER['DOCUMENT_ROOT']; $pro='/upload/'; $uploadDir = $path.$pro;if(isset($_POST['upload'])){$fileName = $_FILES['userfile']['name'];$tmpName = $_FILES['userfile']['tmp_name'];$fileSize = $_FILES['userfile']['size'];$fileType = $_FILES['userfile']['type'];$filePath = $uploadDir . $fileName;// get the file extension first$ext = substr(strrchr($fileName, "."), 1); // make the random file name $randName = md5(rand() * time()); $imag=$randName.'.' . $ext;// and now we have the unique file name for the upload file$filePath = $uploadDir . $randName . '.' . $ext;$result = move_uploaded_file($tmpName, $filePath);}?><form method="post" enctype="multipart/form-data"><table width="71%" border="0" cellpadding="1" cellspacing="1" class="box" align="center" ><tr> <td width="47%"><input type="hidden" name="MAX_FILE_SIZE" value="2000000"><input name="userfile" type="file" id="userfile"> </td><td width="53%"><input name="upload" type="submit" class="box" id="upload" value=" Upload "></td></tr></table></form>

Share this post


Link to post
Share on other sites

hmmm what do you mean by the image is not visible? I tested your code and it seemed to work fine, it upload the image and renamed it and placed it in a folder I made called upload.can you be more clear as to what you mean by not visible, do you mean when you try to display the image its not showing up? or is not showing up in your upload folder?

Share this post


Link to post
Share on other sites

Upload Photo.php<?session_start();if(!$_SESSION["member_id"])header("location:login.php");include "include/header1.php";include "include/config.inc.php";$eid1=$_SESSION["member_id"];if($_FILES){ $_REQUEST['photos']; $path=$_SERVER[DOCUMENT_ROOT]; $uploaddir= $path."./match/user/user_images/"; $image_name = $_FILES['photos']['name']; $cimg = str_replace("","_",$image_name); $upload_file = $uploaddir . $cimg; $type=substr($upload_file,-4,4); $names=time()."_".$eid1."$type"; $new_name=$uploaddir.time()."_".$_SESSION["member_id"]."$type"; /* $cimages=$_FILES['photos']['name']; $cimag=str_replace(" ","_",$cimages); $uploadfiles=$uploaddir.$cimag; $uploadfiles=$cimag; $uploaddir.$uploadfiles; */ $uploadfiles=$cimg; //$uploaddir.$uploadfiles; move_uploaded_file($_FILES['photos']['tmp_name'], $upload_file);//$uploaddir. $new=rename($upload_file,$new_name); $qry=("update register set user_image='".$names."' where member_id='".$_SESSION["member_id"]."'"); $exc=mysql_query($qry); //$my=mysql_fetch_array($exc); //echo "select * from register where user_id='".$_REQUEST['eid']."'"; ?><script> window.location='success_upload_photo.php'; </script> <? }//echo "select * from register where user_id='".$_REQUEST['eid']."'"; ?></td> </tr> <tr> <td align="left" valign="middle" bgcolor="#e2e2e2"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th height="25" align="left" valign="middle" scope="col"><span class="pink_text"><a href="#" class="pink_text">My Match :</a></span><span class="style1"><a href="update_member.php" class="sky_text"> My Membership</a> </span><span class="pink_text">|</span><span class="style1"> <a href="#" class="sky_text">My Profile </a></span><span class="pink_text">|</span><span class="style1"> <a href="favourites.php" class="sky_text">My Favorites</a> </span><span class="pink_text">|</span><span class="style1"> <a href="#" class="sky_text">My Contacts</a> </span><span class="pink_text">|</span><span class="sky_text"> <a href="match_finder.php" class="sky_text">Matchfinder</a> </span><span class="pink_text">|</span></th> </tr> <? $sel_status="select * from register where member_id='".$_SESSION["member_id"]."'"; $exe_status=mysql_query($sel_status); $fet_status=mysql_fetch_array($exe_status); $status=$fet_status['status']; $user_image_sta=$fet_status['user_image']; if($status == 1) { ?> <tr> <td height="25" align="left" valign="middle"><span class="sky_text"><a href="profile_status.php" class="sky_text">Profile Status</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="profile-modify_page1.php" class="sky_text">Modify Profile</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="preview_profile.php" class="sky_text">Preview my profile</a> </span></td> </tr> <? } elseif($status == 2) { ?> <tr> <td height="25" align="left" valign="middle"><span class="sky_text"><a href="profile_status.php" class="sky_text">Profile Status</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="profile-modify_page1.php" class="sky_text">Modify Profile</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="preview_profile.php" class="sky_text">Preview my profile</a> </span><span class="pink_text">|</span><span class="sky_text"><a href="upload_photo.php"class="sky_text"> Upload Photo</a></span><? if($user_image_sta<>"NOIMAGE.jpg"){?><span class="pink_text"> | </span><span class="sky_text"><a href="remove_upload_photo.php" class="sky_text">Remove Photo</a></span><? }?></td> </tr> <? } elseif($status == 3) { ?> <tr> <td height="25" align="left" valign="middle"><span class="sky_text"><a href="profile_status.php" class="sky_text">Profile Status</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="profile-modify_page1.php" class="sky_text">Modify Profile</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="preview_profile.php" class="sky_text">Preview my profile</a> </span><span class="pink_text">|</span><span class="sky_text"><a href="upload_photo.php"class="sky_text"> Upload Photo</a></span><? if($user_image_sta<>"NOIMAGE.jpg"){?><span class="pink_text"> | </span><span class="sky_text"><a href="remove_upload_photo.php" class="sky_text">Remove Photo</a></span><? }?><span class="pink_text"> | </span><span class="sky_text"><a href="profile_suspend.php" class="sky_text">Suspend Profile</a></span></td> </tr> <? } else { ?> <tr> <td height="25" align="left" valign="middle"><span class="sky_text"><a href="profile_status.php" class="sky_text">Profile Status</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="profile-modify_page1.php" class="sky_text">Modify Profile</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="preview_profile.php" class="sky_text">Preview my profile</a> </span><span class="pink_text"> | </span><span class="sky_text"><a href="profile_reactive.php" class="sky_text"> Re-Activate Profile</a></span></td> </tr> <? } ?> </table></td> </tr> </table> <table width="780" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="248"> </td> <td width="191"> </td> </tr> <tr> <td valign="top"> </td> <td> </td> </tr> <tr> <td valign="top"><div align="center"> <table width="566" border="0" cellpadding="0" cellspacing="0"> <TR> <TD width="562" align="left" vAlign=top class="blue-border"> <form name="a" action="" method="post" enctype="multipart/form-data"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th colspan="3" class="bg_text_heading" scope="col">Upload Photo </th> </tr> <tr> <td> </td> <td align="left" valign="top"> </td> <td> </td> </tr> <tr> <td width="15"> </td> <td align="left" valign="top" class="text-plain">Most members search by photos, so add your photo and receive more interest from other members. It only takes a few minutes.</td> <td width="15"> </td> </tr> <tr> <td width="15"> </td> <td align="left" valign="top"> </td> <td width="15"> </td> </tr> <tr> <td> </td> <td align="left" valign="top" class="text-plain">Click on the browse button to find the photo on the computer </td> <td> </td> </tr> <tr> <td> </td> <td align="left" valign="top"> </td> <td> </td> </tr> <tr> <td colspan="3" class="bg_text_heading"><B>Guidelines</B></td> </tr> <tr> <td> </td> <td align="left" valign="top"> </td> <td> </td> </tr> <tr> <td> </td> <td align="left" valign="top"><UL class="text-plain"> <LI>The file must be either a BMP, JPG or a GIF <LI>The maximum file size is 1.5 Mb <LI>Crop out large white spaces <LI class="style2">Sexual references, nudity, or offensive material is not permitted. <LI class="style2">Cartoons, illustrations, photos of anyone other than yourself are not permitted. </LI> </UL></td> <td> </td> </tr> <tr> <td> </td> <td align="left" valign="top"> </td> <td> </td> </tr> <tr> <td> </td> <td align="left" valign="top" class="text-plain">Appropriate content for your photo, <A class=milLnkDefault href="java script:pop('create_profile','Appropriate_Content')">click here</A> </td> <td> </td> </tr> <tr> <td> </td> <td align="center" valign="top"><input name="photos" type="file" size="30"></td> <td> </td> </tr> <tr> <td> </td> <td align="center" valign="top"> </td> <td> </td> </tr> <tr> <td> </td> <td align="center" valign="top"><table width="100" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="6" scope="col"><img src="images/lf_blubtn.gif" width="6" height="25"></td> <td align="center" background="images/bg_blubtn.gif" class="blubtn_text" scope="col"><a href="java script:document.a.submit(); document.a.action='success_upload.php?eid=<?=$_REQUEST['eid']?>'" class="blubtn_text">Upload Photo</a> </td> <td width="5" align="right" valign="top" scope="col"><img src="images/rt_blubtn.gif" width="5" height="24"></td> </tr> </table></td> <td> </td> </tr> <tr> <td width="15"> </td> <td align="left" valign="top"> </td> <td width="15"> </td> </tr> </table></form></TD> </TR> </table> </div></td> <td><p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td colspan="2"><div align="center"> <table width="100%" border="0" cellpadding="0" cellspacing="0" > <tr> <td align="center" scope="row"><span class="logintext"> <?include "include/footer1.php";?></td> </tr> </table> </div></td> </tr> </table></td> </tr> </table></td> </tr></table></body></html>success_upload_photo.php<? session_start();if(!$_SESSION["member_id"])header("location:login.php");include "include/config.inc.php";$_REQUEST['eid'];$qry = mysql_query("SELECT * FROM register WHERE member_id='".$_SESSION["member_id"]."'");//echo "SELECT * FROM register WHERE user_id='".$_REQUEST['eid']."'"; $res_qry = mysql_fetch_object($qry);$image=$res_qry->user_image;if( $image!=''){$image="../user/user_images/".$image;}else{$image="user_images/noimages.jpg";}?><link href="wedeliverlovestyles.css" rel="stylesheet" type="text/css"><style type="text/css"><!--.profile_active_text { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #FF0066;}--></style></head><body topmargin="0" leftmargin="0"><table width="100%" height="590"border="0" cellpadding="0" cellspacing="0" background="#56595C"> <tr> <td align="center" valign="top" bgcolor="#56595C" scope="col"><table width="780" border="0" cellpadding="0" cellspacing="0" bgcolor="#e2e2e2"> <tr> <td align="left" valign="top" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr><?include "include/header1.php";?></td> </tr> <tr> <td align="left" valign="middle" bgcolor="#e2e2e2"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th height="25" align="left" valign="middle" scope="col"><span class="pink_text"><a href="#" class="pink_text">My Match :</a></span><span class="style1"><a href="update_member.php" class="sky_text"> My Membership</a> </span><span class="pink_text">|</span><span class="style1"> <a href="#" class="sky_text">My Profile </a></span><span class="pink_text">|</span><span class="style1"> <a href="#" class="sky_text">My Favourites</a> </span><span class="pink_text">|</span><span class="style1"> <a href="#" class="sky_text">My Contacts</a> </span><span class="pink_text">|</span><span class="sky_text"> <a href="#" class="sky_text">Matchfinder</a> </span><span class="pink_text">|</span></th> </tr> <? $sel_status="select * from register where member_id='".$_SESSION["member_id"]."'"; $exe_status=mysql_query($sel_status); $fet_status=mysql_fetch_array($exe_status); $status=$fet_status['status']; $user_image_sta=$fet_status['user_image']; if($status == 1) { ?> <tr> <td height="25" align="left" valign="middle"><span class="sky_text"><a href="profile_status.php" class="sky_text">Profile Status</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="profile-modify_page1.php" class="sky_text">Modify Profile</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="preview_profile.php" class="sky_text">Preview my profile</a> </span></td> </tr> <? } elseif($status == 2) { ?> <tr> <td height="25" align="left" valign="middle"><span class="sky_text"><a href="profile_status.php" class="sky_text">Profile Status</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="profile-modify_page1.php" class="sky_text">Modify Profile</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="preview_profile.php" class="sky_text">Preview my profile</a> </span><span class="pink_text">|</span><span class="sky_text"><a href="upload_photo.php"class="sky_text"> Upload Photo</a></span><? if($user_image_sta<>"NOIMAGE.jpg"){?><span class="pink_text"> | </span><span class="sky_text"><a href="remove_upload_photo.php" class="sky_text">Remove Photo</a></span><? }?></td> </tr> <? } else { ?> <tr> <td height="25" align="left" valign="middle"><span class="sky_text"><a href="profile_status.php" class="sky_text">Profile Status</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="profile-modify_page1.php" class="sky_text">Modify Profile</a> </span><span class="pink_text">| </span><span class="sky_text"><a href="preview_profile.php" class="sky_text">Preview my profile</a> </span><span class="pink_text">|</span><span class="sky_text"><a href="upload_photo.php"class="sky_text"> Upload Photo</a></span><? if($user_image_sta<>"NOIMAGE.jpg"){?><span class="pink_text"> | </span><span class="sky_text"><a href="remove_upload_photo.php" class="sky_text">Remove Photo</a></span><? }?><span class="pink_text"> | </span><span class="sky_text">Suspend Profile </span></td> </tr> <? } ?> </table></td> </tr> </table> <table width="780" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="248"> </td> <td width="191"> </td> </tr> <tr> <td valign="top"> </td> <td> </td> </tr> <tr> <td valign="top"><div align="center"> <table width="566" border="0" cellpadding="0" cellspacing="0"> <TR> <TD width="562" align="left" vAlign=top class="blue-border"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th scope="col"> </th> <td align="left" valign="top" class="box_headng" scope="col"> </td> <th scope="col"> </th> </tr> <tr> <th width="15" scope="col"> </th> <td align="left" valign="top" class="box_headng" scope="col">Your Photo has uploaded Successfully! </td> <th width="15" scope="col"> </th> </tr> <tr> <td> </td> <td align="center" valign="top" class="text-plain"> </td> <td> </td> </tr> <tr> <td> </td> <td height="300" align="center" valign="top" class="text-plain"><table width="60%" border="0" cellspacing="0" cellpadding="0"> <tr> <th height="300" class="blue-border" scope="col"><img src="<?=$image?>" height="250" width="300"></th> </tr> </table></td> <td> </td> </tr> <tr> <td width="15"> </td> <td align="left" valign="top"> </td> <td width="15"> </td> </tr> </table></TD> </TR> </table> </div></td> <td></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="15" scope="col"> </th> <th align="center" valign="middle" class="profile_extramenu" scope="col"><img src="images/things.gif" width="18" height="17"></th> <td align="left" valign="middle" class="profile_extramenu" scope="col"><a href="#" class="profile_extramenu">Things to do ! </a></td> <th width="5" scope="col"> </th> <td align="center" valign="middle" class="profile_extramenu" scope="col"><img src="images/homr.gif" width="23" height="23"></td> <td align="left" valign="middle" class="profile_extramenu" scope="col"><a href="match_finder_contacts.php" class="profile_extramenu">Like to go Home? </a></td> <th width="5" scope="col"> </th> <td align="center" valign="middle" class="profile_extramenu" scope="col"><img src="images/search1.gif" width="19" height="22"></td> <td align="left" valign="middle" class="profile_extramenu" scope="col"><a href="search_easy.php" class="profile_extramenu">Start Searching..... </a></td> </tr> </table></td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td colspan="2"><div align="left"></div></td> </tr> <tr> <td colspan="2"><div align="center"> </div></td> </tr> </table></td> </tr> </table></td> </tr></table></body></html> <?include "include/footer1.php";?>search_results_newestprofile1.php<?ob_start();session_start(); include "include/config.inc.php";$on=$_REQUEST['s_online_now'];$ph=$_REQUEST['s_photo'];$pro=$_REQUEST['s_photo_gallery'];//echo $pro;//echo $on;$coun=$_REQUEST['category']; $ser=$_REQUEST['looking']; $frm=$_REQUEST['s_age_from']; $to=$_REQUEST['s_age_to']; $mem=$_REQUEST['s_member_id']; $username=$_REQUEST['s_known_as']; $langus=$_REQUEST['s_profile_language_id']; $smoke=$_REQUEST['sm_smoke_id']; $drink=$_REQUEST['sm_alcohol_id']; $vegita=$_REQUEST['sm_vegetarian_id']; $resent=$_REQUEST['s_recent_id']; $child=$_REQUEST['s_children']; $edu=$_REQUEST['sm_education_id']; $mat1=$_REQUEST['sm_marital_any']; $mat2=$_REQUEST['sm_marital_att']; $mat3=$_REQUEST['sm_marital_div']; $mat4=$_REQUEST['sm_marital_married']; $mat5=$_REQUEST['sm_marital_sep']; $mat6=$_REQUEST['sm_marital_sin']; $mat7=$_REQUEST['sm_marital_wid']; $rel1=$_REQUEST['sm_match_any']; $rel2=$_REQUEST['sm_match_acti']; $rel3=$_REQUEST['sm_match_cas']; $rel4=$_REQUEST['sm_match_fri']; $rel5=$_REQUEST['sm_match_marr']; $rel6=$_REQUEST['sm_match_rela']; $rel7=$_REQUEST['sm_match_rom']; $rel8=$_REQUEST['sm_match_tra']; $eye1=$_REQUEST['sm_eye_colour_any']; $eye2=$_REQUEST['sm_eye_colour_bla']; $eye3=$_REQUEST['sm_eye_colour_blue']; $eye4=$_REQUEST['sm_eye_colour_brown']; $eye5=$_REQUEST['sm_eye_colour_green']; $eye6=$_REQUEST['sm_eye_colour_grey']; $eye7=$_REQUEST['sm_eye_colour_hazel']; $hair1=$_REQUEST['sm_hair_colour_any']; $hair2=$_REQUEST['sm_hair_colour_anb']; $hair3=$_REQUEST['sm_hair_colour_bal']; $hair4=$_REQUEST['sm_hair_colour_bla']; $hair5=$_REQUEST['sm_hair_colour_blo']; $hair6=$_REQUEST['sm_hair_colour_bro']; $hair7=$_REQUEST['sm_hair_colour_ligbro']; $hair8=$_REQUEST['sm_hair_colour_other']; $hair9=$_REQUEST['sm_hair_colour_red']; $hair10=$_REQUEST['sm_hair_colour_white']; $height1=$_REQUEST['sm_height_any']; $height2=$_REQUEST['sm_height_below']; $height3=$_REQUEST['sm_height_to']; $height4=$_REQUEST['sm_height_just']; $height5=$_REQUEST['sm_height_abov']; $body1=$_REQUEST['sm_weight_any']; $body2=$_REQUEST['sm_weight_ample']; $body3=$_REQUEST['sm_weight_athle']; $body4=$_REQUEST['sm_weight_avera']; $body5=$_REQUEST['sm_weight_cudd']; $body6=$_REQUEST['sm_weight_slim']; $body7=$_REQUEST['sm_weight_verycu']; $Activity=$_REQUEST['Activity']; $casual=$_REQUEST['casual']; $Friendship=$_REQUEST['Friendship']; $Marriage=$_REQUEST['Marriage']; $Relationship=$_REQUEST['Relationship']; $Romance=$_REQUEST['Romance']; $Travel=$_REQUEST['Travel']; ////////////////advanced search/////////////////////////////////// $race=''; if(is_array($_REQUEST['race'])) { foreach($_REQUEST['race'] as $val) { $race=$race.$val.","; } } $race=substr($race, 0, (strlen($race)-1)); $race_parts=explode(",",$race); if(is_array($race_parts)) { $race_query='('; } foreach($race_parts as $val) { $race_query.=' int_id like \'%'.$val.'%\' or '; } $race_query=ereg_replace("( or )+$","",$race_query); $race_query.=' ) '; $race_query; $interest=''; if(is_array($_REQUEST['interests'])) { foreach($_REQUEST['interests'] as $val) { $interest=$interest.$val.","; } } $interest=substr($interest, 0, (strlen($interest)-1)); $interest_parts=explode(",",$interest); if(is_array($interest_parts)) { $interest_query='('; } foreach($interest_parts as $val) { $interest_query.=' int_id like \'%'.$val.'%\' or '; } $interest_query=ereg_replace("( or )+$","",$interest_query); $interest_query.=' ) '; $interest_query; //echo "interest:".$interest; $religion=''; if(is_array($_REQUEST['religion'])) { foreach($_REQUEST['religion'] as $val) { $religion=$religion.$val.","; } } $religion=substr($religion, 0, (strlen($religion)-1)); $religion_parts=explode(",",$religion); if(is_array($religion_parts)) { $religion_query='('; } foreach($religion_parts as $val) { $religion_query.=' int_id like \'%'.$val.'%\' or '; } $religion_query=ereg_replace("( or )+$","",$religion_query); $religion_query.=' ) '; $religion_query; $language=''; if(is_array($_REQUEST['language'])) { foreach($_REQUEST['language'] as $val) { $language=$language.$val.","; } } $language=substr($language, 0, (strlen($language)-1)); $language_parts=explode(",",$language); if(is_array($language_parts)) { $language_query='('; } foreach($language_parts as $val) { $language_query.=' lan1_id like \'%'.$val.'%\' or lan2_id like \'%'.$val.'%\' or lan3_id like \'%'.$val.'%\' or lan4_id like \'%'.$val.'%\' or '; } $language_query=ereg_replace("( or )+$","",$language_query); $language_query.=' ) '; $language_query; ////////////////end advanced search/////////////////////////////////// $sort=$_REQUEST['s_sort_id']; /* show_pages shows the links to the different pages it gets passed the current offset and the total number of images to show on one page ($display_length) */ //$total=$gettotalusers % 3; //$divi=$gettotalusers-$total; //$divi; //if(($gettotalusers MOD 3) == 0 ) //{ /////////////////////////testing//////////////////////////////////// // $search_q=""; if($_POST) { $flag=0; if($looking!="") { $search_q=$search_q." gender='$looking'"; $flag=1; } if($s_age_from!="" && $s_age_to!="") { if($flag==1){ $search_q=$search_q." and age BETWEEN $s_age_from and $s_age_to"; } else{ $search_q=$search_q; $flag=1; } } if($category!="") { if($flag==1){ $search_q=$search_q." and countryid='$category'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_smoke_id!="") { if($flag==1){ $search_q=$search_q." and smok='$sm_smoke_id'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_alcohol_id!="") { if($flag==1){ $search_q=$search_q." and drink='$sm_alcohol_id'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_vegetarian_id!="") { if($flag==1){ $search_q=$search_q." and food='$sm_vegetarian_id'"; } else{ $search_q=$search_q; $flag=1; } } if($s_children!="") { if($flag==1){ $search_q=$search_q." and child='$s_children'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_education_id!="") { if($flag==1){ $search_q=$search_q." and edu_id='$sm_education_id'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_marital_any!="") { if($flag==1){ $search_q=$search_q."and ( marriage_status='$sm_marital_any'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_marital_att!="") { if($flag==1){ $search_q=$search_q."or marriage_status='$sm_marital_att'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_marital_div!="") { if($flag==1){ $search_q=$search_q."or marriage_status='$sm_marital_div'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_marital_married!="") { if($flag==1){ $search_q=$search_q."or marriage_status='$sm_marital_married'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_marital_sep!="") { if($flag==1){ $search_q=$search_q."or marriage_status='$sm_marital_sep'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_marital_sin!="") { if($flag==1){ $search_q=$search_q."or marriage_status='$sm_marital_sin'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_marital_wid!="") { if($flag==1){ $search_q=$search_q."or marriage_status='$sm_marital_wid' ) "; } else{ $search_q=$search_q; $flag=1; } } if($sm_eye_colour_any!="") { if($flag==1){ $search_q=$search_q." and eye_id like '%$sm_eye_colour_any%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_eye_colour_bla!="") { if($flag==1){ $search_q=$search_q." or eye_id like '%$sm_eye_colour_bla%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_eye_colour_blue!="") { if($flag==1){ $search_q=$search_q." or eye_id like '%$sm_eye_colour_blue%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_eye_colour_brown!="") { if($flag==1){ $search_q=$search_q." or eye_id like '%$sm_eye_colour_brown%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_eye_colour_green!="") { if($flag==1){ $search_q=$search_q." or eye_id like '%$sm_eye_colour_green%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_eye_colour_grey!="") { if($flag==1){ $search_q=$search_q." or eye_id like '%$sm_eye_colour_grey%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_eye_colour_hazel!="") { if($flag==1){ $search_q=$search_q." or eye_id like '%$sm_eye_colour_hazel%' "; } else{ $search_q=$search_q; $flag=1; } } if($sm_hair_colour_any!="") { if($flag==1){ $search_q=$search_q."and hair_id like '%$sm_hair_colour_any%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_hair_colour_anb!="") { if($flag==1){ $search_q=$search_q."or hair_id like '%$sm_hair_colour_anb%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_hair_colour_bal!="") { if($flag==1){ $search_q=$search_q."or hair_id like '%$sm_hair_colour_bal%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_hair_colour_bla!="") { if($flag==1){ $search_q=$search_q."or hair_id like '%$sm_hair_colour_bla%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_hair_colour_blo!="") { if($flag==1){ $search_q=$search_q."or hair_id like '%$sm_hair_colour_blo%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_hair_colour_bro!="") { if($flag==1){ $search_q=$search_q."or hair_id like '%$sm_hair_colour_bro%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_hair_colour_ligbro!="") { if($flag==1){ $search_q=$search_q."or hair_id like '%$sm_hair_colour_ligbro%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_hair_colour_other!="") { if($flag==1){ $search_q=$search_q."or hair_id like '%$sm_hair_colour_other%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_hair_colour_red!="") { if($flag==1){ $search_q=$search_q."or hair_id like '%$sm_hair_colour_red%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_hair_colour_white!="") { if($flag==1){ $search_q=$search_q."or hair_id like '%$sm_hair_colour_white%' "; } else{ $search_q=$search_q; $flag=1; } } ///////////////////height/////////////// if($sm_height_any!="") { if($flag==1){ $search_q=$search_q." and height_id like '%$sm_height_any%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_height_below!="") { if($flag==1){ $search_q=$search_q." or height_id like '%$sm_height_below%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_height_to!="") { if($flag==1){ $search_q=$search_q." or height_id like '%$sm_height_to%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_height_just!="") { if($flag==1){ $search_q=$search_q." or height_id like '%$sm_height_just%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_height_abov!="") { if($flag==1){ $search_q=$search_q." or height_id like '%$sm_height_abov%' "; } else{ $search_q=$search_q; $flag=1; } } /////////////end Height////////////////// /////////////body////////////////// if($sm_weight_any!="") { if($flag==1){ $search_q=$search_q."and body_id like '%$sm_weight_any%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_weight_ample!="") { if($flag==1){ $search_q=$search_q."or body_id like '%$sm_weight_ample%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_weight_athle!="") { if($flag==1){ $search_q=$search_q."or body_id like '%$sm_weight_athle%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_weight_avera!="") { if($flag==1){ $search_q=$search_q."or body_id like '%$sm_weight_avera%'"; } else{ $search_q=$search_q; $flag=1; } } if($sm_weight_cudd!="") { if($flag==1){ $search_q=$search_q."or body_id like '%$sm_weight_cudd%' "; } else{ $search_q=$search_q; $flag=1; } } if($sm_weight_slim!="") { if($flag==1){ $search_q=$search_q."or body_id like '%$sm_weight_slim%' "; } else{ $search_q=$search_q; $flag=1; } } if($sm_weight_verycu!="") { if($flag==1){ $search_q=$search_q."or body_id like '%$sm_weight_verycu%' "; } else{ $search_q=$search_q; $flag=1; } } //////////////body end////////////// ///////////////race/////////////// if($race!="") { if($flag==1){ $search_q=$search_q." and $race_query"; } else{ $search_q=$search_q; $flag=1; } } ///////////////race end/////////// ///////////////Religion /////////////// if($religion!="") { if($flag==1){ $search_q=$search_q." and $religion_query"; } else{ $search_q=$search_q; $flag=1; } } ///////////////Religion end/////////// ///////////////language /////////////// if($language!="") { if($flag==1){ $search_q=$search_q." and $language_query "; } else{ $search_q=$search_q; $flag=1; } } /* if($language!="") { if($flag==1){ $search_q=$search_q." or $language_query1 "; } else{ $search_q=$search_q; $flag=1; } } if($language!="") { if($flag==1){ $search_q=$search_q." or $language_query2 "; } else{ $search_q=$search_q; $flag=1; } } if($language!="") { if($flag==1){ $search_q=$search_q." or $language_query3 "; } else{ $search_q=$search_q; $flag=1; } } */ /*if($language!="") { if($flag==1){ $search_q=$search_q." and lan1_id in('$language') or lan2_id in ('$language') or lan3_id in('$language') or lan4_id in ('$language') "; } else{ $search_q=$search_q; $flag=1; } }*/ ///////////////Religion end/////////// ///////////////interest /////////////// if($interest!="") { if($flag==1){ $search_q=$search_q." and $interest_query "; } else{ $search_q=$search_q; $flag=1; } } ///////////////interest end/////////// if($s_member_id!="") { if($flag==0){ $search_q=$search_q." member_id='$s_member_id' and status='3'"; } else{ $search_q=$search_q."status='3'"; $flag=1; } } if($s_known_as!="") { if($flag==0){ $search_q=$search_q." uname='$s_known_as' and status='3'"; } else{ $search_q=$search_q."status='3'"; $flag=1; } } //////////////mutual match/////////// if(($casual != "") || ($Friendship != "") || ($Romance != "") || ($Relationship != "") || ($Travel != "") || ($Marriage != "")) { $muual="select * from relationship where casual = '".$casual."' or romance = '".$Romance."' or relationship = '".$Relationship."' or marriage = '".$Marriage."'";//echo "select * from relationship where casual = '".$casual."' or romance = '".$Romance."' or relationship = '".$Relationship."' or marriage = '".$Marriage."'";$out=mysql_query($muual);$qry = "SELECT * FROM register,relationship where relationship.`casual`='".$casual."' or relationship.`romance` = '".$Romance."' or relationship.`relationship` = '".$Relationship."' or relationship.`marriage` = '".$Marriage."'and register.status='3' and register.`gender` = '".$looking."' and regster.`age` BETWEEN '".$s_age_from."' AND '".$s_age_to."' and register.member_id=relationship.member_id";//echo "SELECT * FROM register,relationship where relationship.`friendship`='".$Friendship."' or relationship.`casual`='".$casual."' or relationship.`romance` = '".$Romance."' or relationship.`relationship` = '".$Relationship."' or relationship.`marriage` = '".$Marriage."'and register.status='3' and register.`gender` = '".$looking."' and regster.`age` BETWEEN '".$s_age_from."' AND '".$s_age_to."' and register.member_id=relationship.member_id";//echo "SELECT * FROM register,relationship where relationship.`friendship`='".$Friendship."' or relationship.`romance`='".$Romance."' or relationship.`casual`='".$casual."' and register.status='3' and register.member_id=relationship.member_id";$re=@mysql_num_rows($out);for($i=0;$i<$re;$i++) { $get=mysql_fetch_array($out); $mem=$get['member_id']; } } ////////////////mutual match end/////////// if($_SESSION['member_id'] != '') { $search_q=$search_q." and member_id != '".$_SESSION['member_id']."'"; } if($_REQUEST['s_online_now'] == '1') { $search_q=$search_q." and online = '1'"; } if($_REQUEST['s_photo'] == 'yes') { $search_q=$search_q." and user_image != ''"; } $_SESSION[qry_str]=false;} ////////////////////////else part////////////// else { if($_REQUEST['s_online_now'] == '1') { $search_q=$search_q." and online = '1'"; } if($_REQUEST['s_photo'] == 'yes') { $search_q=$search_q." and user_image != ''"; } $qry=$_SESSION[qry_str]; } if($_REQUEST['query1']) { $qry=$_REQUEST['query1']; $qry= stripslashes($qry); if(!$_SESSION[qry_str]) { $_SESSION[qry_str]=$qry;} else{ $qry=$_SESSION[qry_str];} } else { if($s_sort_id=="") { if($_REQUEST['s_online_now'] == '1') { $search_q=$search_q." and online = '1'"; } if($_REQUEST[

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...