Current location: Hot Scripts Forums » Programming Languages » PHP » Adding section in form depending on user


Adding section in form depending on user

Reply
  #1 (permalink)  
Old 12-16-08, 11:29 PM
peuplarchie's Avatar
peuplarchie peuplarchie is offline
Newbie Coder
 
Join Date: Nov 2008
Posts: 64
Thanks: 1
Thanked 0 Times in 0 Posts
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-17-08, 05:12 AM
Yeroon's Avatar
Yeroon Yeroon is offline
Code Master
 
Join Date: Aug 2007
Location: Netherlands, Nijmegen
Posts: 850
Thanks: 2
Thanked 20 Times in 20 Posts
Well I am no PhP wizzard, especially with Ajax calls (which you need for your goal), so I am just putting you in right direction. Here's a very straight forward PhP Ajax tutorial:

http://www.ajaxf1.com/tutorial/ajax-php.html
__________________
Feel free to thank people if they help you by clicking thanks at a post.
=================================
Make it idiot proof and someone will make a better idiot.
=================================
Realise the impotence of proof reading everything you publish
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 01-03-09, 05:08 AM
maneetpuri maneetpuri is offline
Newbie Coder
 
Join Date: Nov 2008
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Re:- AJAX is the best way to accomplish

Hi,

Yehroon is right, AJAX is the best way to accomplish the same. You can even use use JS and DIVs to do this but it will be more complex as compared to AJAX. Plus with AJAX & PHP you can even work with databases with ease.



Cheers,
__________________
Maneet Puri
India Web Site Design Services
PHP Web Development
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
After a user submits a form redirect them to a new page steptoe PHP 1 05-22-08 11:56 AM
The Art Nexus seeking PHP programmers TheArtNexus Job Offers & Assistance 5 02-26-08 04:08 AM
Php Mail form - Adding an attachment vivabensmith Script Requests 4 11-14-06 04:21 AM
formmail problem gscraper Perl 12 08-27-04 04:06 AM
Limit the form submission according to time bionicsamir PHP 7 05-10-04 12:10 AM


All times are GMT -5. The time now is 01:52 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.