...

View Full Version : Help, searching properties.



AJDeBres
07-23-2012, 11:50 AM
I am trying to edit some coding so that I can make searching on a website gender specific, women can only see and search for men, and men can only see and search for women, however I have no clue where to start....



I would assume. it would be something of the sort of

If $sex =male

some way to find female? I'm lost lol any help would be great.

Keleth
07-23-2012, 04:09 PM
You need to have a column in your database to specify gender, and when its male search for female and vice versa. But if you're having trouble with this, and I don't mean the following offensively, you should go back and learn database basics. I struggled to think of an answer that was more complicated then "search for what you want", but this is a very basic application of databases, and it seems a bit like you're jumping ahead to writing code without the knowledge to write it.

Are you currently using a database?

AJDeBres
07-24-2012, 09:25 AM
I am yes, I'm not familiar with how dolphin 7 has its databases setup honestly. everything is predefined and drag and drop sort of building.


on a side note no I do not find it offensive, however I'm a hands on type of person. just looking for a starting point. thanks.

Arcticwarrio
07-24-2012, 02:47 PM
you could set a session variable in your login script to set the gender of the current user from the database

i dont know how your site logs in but



//login function
$_SESSION['Gender'] = $row['Gender'];

//page search query
$result = Q("SELECT * FROM `people` WHERE `Gender` != ". $_SESSION['Gender']);

AJDeBres
08-02-2012, 12:34 AM
you could set a session variable in your login script to set the gender of the current user from the database

i dont know how your site logs in but



//login function
$_SESSION['Gender'] = $row['Gender'];

//page search query
$result = Q("SELECT * FROM `people` WHERE `Gender` != ". $_SESSION['Gender']);





thanks for that, since I have posted this I purchased a program called Dolphin 7.0.9 so I'm trying to weed my way through all the portal software crap.


anyone happen to be familiar with this at all? if so some pointers would be great, as far as locations to edit "etc" and so on. thanks again.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum