Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-17-2008, 04:30 AM   PM User | #1
Peuplarchie
Regular Coder

 
Join Date: Feb 2006
Posts: 262
Thanks: 23
Thanked 1 Time in 1 Post
Peuplarchie is an unknown quantity at this point
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...
Peuplarchie is offline   Reply With Quote
Old 12-17-2008, 06:23 AM   PM User | #2
lokeshshettyk
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
lokeshshettyk is an unknown quantity at this point
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)
lokeshshettyk is offline   Reply With Quote
Old 12-17-2008, 11:19 AM   PM User | #3
194673
Regular Coder

 
Join Date: Dec 2006
Posts: 166
Thanks: 9
Thanked 4 Times in 4 Posts
194673 is an unknown quantity at this point
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
194673 is offline   Reply With Quote
Old 12-17-2008, 05:07 PM   PM User | #4
Dave.H
New Coder

 
Join Date: Jan 2007
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
Dave.H is an unknown quantity at this point
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.
Dave.H is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:37 AM.


Advertisement
Log in to turn off these ads.