Jump to content

User-end record sorting plus another question


Dimwhit

Recommended Posts

I'm self-taught in all this, and as such, I know very little. Here's what I'm working with:

 

- adoption-related website with records of families wanting to adopt. They've listed gender, age, and number of children preferences. I'm looking for a way to sort through these records based on those criteria.

 

Here's what I have so far:

 

- I'm able to do most of this by passing the variable through the url. For example

 

view.php?gender=Girl&age=LT9

 

Will return only records of families looking to adopt a girl under 9 years old. So I now have 2 questions.

 

1. Can I pass an 'OR' function this way? The gender options are Boy, Girl, and Either, so I need to be able to pass 2 of those. e.g. view.php?gender=Girl OR gender=Either. I'm not sure how to do that, or if there's even a way. Maybe I need to input the data into the db differently in the first place.

 

2. I'd like a simple form where the age, gender, and number if children can be entered, then sorted. I've tried to find some tutorials explaining this, but I haven't found any that I've been able to understand. I'm not looking for someone here to give me a detailed explanation on how to do it...just to maybe point me to a tutorial that's geared toward relative newbies like me.

simple when you think about it

 

pass the "Gender" variable through a series of if / then / else statements

 

 

if ($_REQUEST['Gender'] == 'girl') {

    ...

} elseif ($_REQUEST['Gender'] == 'bou') {

    ...

} else {

    ...

}

 

lots of things you can do inside of that framework

simple when you think about it

 

pass the "Gender" variable through a series of if / then / else statements

 

 

if ($_REQUEST['Gender'] == 'girl') {

     ...

} elseif ($_REQUEST['Gender'] == 'bou') {

     ...

} else {

     ...

}

 

lots of things you can do inside of that framework

 

lol Whats a bou? :P

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.