Dynamic HTML/PHP/MySQL Form

Discussion in 'PHP' started by coool, Jul 12, 2007.

  1. coool

    coool New Member

    Joined:
    Jul 12, 2007
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    0
    Hi everyone,

    I really need a help.. I feel kind of lost somewhere ! .. I have a deadline on this coming Monday.. - 4 days left

    2 forms at the same page
    __________________________
    Form 1:

    I have a list called available_fields, it has the name of my table's columns in the database - I already retrieve the content of this list from my database (multiple selection can be done here)

    now I need a button that moves the selected items from my available_ fields list TO selected_fields list.. also a button to do the opposite (move back the elements)

    now! what's in the selected_fields list should be used later in a MySQL query as fields of my result table
    __________________________
    Form 2

    I should have a counter here of number of conditions (criterias) of our query
    I have a drop down list that have (AND) (OR) .. logic !
    I have a drop down list of brackets such as ( (( ((( (((( (((((
    I have a drop down list with all fields again ( but a dropDownList not a list ) - one selection only
    I have a drop down list of comparisions such as ( = != InList NotInList .. etc )
    I should have a list of values of the exact field selected ( this is a dependent list on which field has been selected)
    I have a drop down list of brackets such as ) )) ))) )))) )))))
    then a botton allowing the user to delete the condition
    at the end of this form there should be a button to add another criteria (condition)

    now! the result of this form should be used later in a MySQL query as conditions on my result table
    __________________________
    then I should have something like this:
    SELECT _ _ -result of form 1 _ _ FROM tableName WHERE _ _ result of form 2_ _)
    at the end I should display the result of this query in a different page
    __________________________
    please help!

    at lease.. I need a small clear example..

    P.S. I have a pic of the form I need to program.. but could not attached it here.. send me an email (co.ooo.ol@hotmail.com) if you want to see it.. I can e-mail you the form picture..
     
  2. coool

    coool New Member

    Joined:
    Jul 12, 2007
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    0
  3. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Show me the pic, I might get a better idea of what you want!
     
  4. coool

    coool New Member

    Joined:
    Jul 12, 2007
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    0
    I just did.. :)
     
  5. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    The 1st form is easy, you'll find a lot of free JavaScript code to move items between select boxes!
     
  6. coool

    coool New Member

    Joined:
    Jul 12, 2007
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    0
    Can you please post a way to do that using javascript ! .. so everyone reading this post will be benefited..

    or just direct me to some links that have the free code to do the process ! ..

    thanks in advace :)
     
  7. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
  8. coool

    coool New Member

    Joined:
    Jul 12, 2007
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    0
    Thanks alot.. this is really useful :)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice