Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Searching images?

    I'm new here - so greetings! My name is Lilly and I'm a (Very) amateur web-mistress. And I am looking for help with my grandiose plan XD

    I am trying to accomplish an image searching system. Ideally, I will have parameters set -2 type boxes and 5 drop down menus with optional search parameters. When 'search' is clicked, I would want all of the images that meet the selected parameters to be displayed in a column under the search parameters section.

    Forgive my terrible artistry, but perhaps an image will help:


    And after searching something like this:


    Is this possible? Is it possible with PHP or should I seek another coding language? And where do I go to get started writing the code for this project? Thanks a ton!
    <3
    Lilly

  • #2
    Regular Coder Zangeel's Avatar
    Join Date
    Oct 2007
    Location
    public_html/
    Posts
    638
    Thanks
    17
    Thanked 79 Times in 79 Posts
    This is just a basic SQL query type of thing. Basically what you want, is a database with the photo's information, it'd ID, it's type, it's category, whichever drop down categories you want. When you hit submit it will send the query to mySql or whichever database and pull up the results.

    Without you showing anything like a database design, I can't really help more than give you an idea on how to do it. But it would be the same type of thing if you wanted a text input to search mysql queries for a name of someone. "SELECT `name` FROM `tableName` WHERE `name` = '..User parameters here'"

    And yes php is perfectly capable, and probably one of the better options.
    PHP Code:
    $aString is_string((string)array()) ? true false// true :D 
    [/CENTER]

  • #3
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, I'll start researching MySQL stuff then ^.^ I'm totally new, so I don't know if this is a project that I can finish in any reasonable amount of time, but I do want to start on it. can't finish without starting

  • #4
    Regular Coder Zangeel's Avatar
    Join Date
    Oct 2007
    Location
    public_html/
    Posts
    638
    Thanks
    17
    Thanked 79 Times in 79 Posts
    Once you learn how to make a basic MySql table, and basic PHP loops and sql queries the rest will be easy assuming you know how to make HTML forms as well.

    I don't know if you want to upload pictures using PHP or if you want to just FTP them to the server. An upload form on the site itself would be easier in the long run since while you're telling PHP to upload the picture to the server you can also make a SQL query to add a new picture in MySql hence making it searchable, so for example maybe you'd want to do something like

    Page One Upload form
    In the upload form you would have an html form to choose a photo, then text inputs and drop downs to enter the name of the picture, the category it's in and all the other fields, then all you'd need to do is use php to upload the picture itself, and add sql information, both things are easy, and google offers tons of tuts on both.

    Then a second page to browse photos, with all the categories and dropdowns you want for a search criteria, which would be run through a sql line like the example I gave, which would then loop through the results, and that's be the most basic way to do it.

    If you need help on any part of it just post back, if I were you'd I'd start with learning to make MySql tables, which are easy to learn, then get into more PHP which can be more complicated just because there's a plethora of ways to do one thing with thousands of functions, and you need to get the syntax just right. But once you learn the basics it becomes natural, and a project like this wouldn't take you more than a half hour.
    PHP Code:
    $aString is_string((string)array()) ? true false// true :D 
    [/CENTER]


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •