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
    Regular Coder
    Join Date
    Feb 2006
    Posts
    262
    Thanks
    23
    Thanked 1 Time in 1 Post

    Post Adding section in form depending on user

    Good day to you all,
    here i come again with a probably easy question for you but I can't find what i'm looking for.


    What I have:
    Simple form....
    PHP Code:
    <input name="artist" value="Artist" />
    <
    input name="country" value="Country" />

    <
    input name="cd" value="Album" />
    <
    input name="year" value="year" />
    <
    input name="price" value="price" /> 

    MY GOAL:


    Have a link that would add a section into the form dynamicly with out reloading of the page. (add an album from this artist)
    PHP Code:
    <input name="cd" value="Album" />
    <
    input name="year" value="year" />
    <
    input name="recorded" value="Recorded" /> 

    BUT:
    Here is the twist, I need to be able if to add another section for DVD.
    Different field is required for this...
    PHP Code:
    <input name="DVD" value="DVD" />
    <
    input name="year" value="year" />
    <
    input name="where" value="where" /> 

    I know there will be some JS and CSS but I think the core could be PHP.


    Thanks for any help, I still searching, directions would be nice...

  • #2
    Regular Coder lokeshshettyk's Avatar
    Join Date
    Aug 2008
    Location
    On the way to the moon!
    Posts
    157
    Thanks
    5
    Thanked 20 Times in 20 Posts
    Your question itself is kinda confusing, not very clear to ME. However as far as i understood you may accomplish this with Ajax or JS (DOM)

  • #3
    Regular Coder
    Join Date
    Dec 2006
    Posts
    166
    Thanks
    9
    Thanked 4 Times in 4 Posts
    I agree with lokeshshettyk; I don't really know what you're trying to do. How is adding the DVD different from adding the CD

  • #4
    New Coder
    Join Date
    Jan 2007
    Posts
    37
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Well you need to explain more clearly but the sort of fetching and displaying based on selection concept can be seen here:

    http://www.w3schools.com/php/php_ajax_database.asp

    instead of showing the table and information you would spit out the select menu's you want for those specific categories.


  •  

    Posting Permissions

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