Jump to content

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

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • 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.