| | |
interesting situation
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2008
Posts: 46
Reputation:
Solved Threads: 0
hey nav33n.
you probably did not understand my requirement(or maybe i am not understanding your solution)....
What is need is this:
there is a form, say P1, where the user specifies whether he is a teacher/student.
Irrespective of his answer, he is re-directed to P2 on submission of P1.
Now, P2 is also a form. If the person == teacher, then P2 (also a form) contains some text field, and a drop-down-list, DDL1.
On the other hand, if person == student, then P2 contains the SAME text fields(as in the case of teacher), but a different drop-down-list, say DDL2.
I can do this using 2 different forms, one for the teacher and 1 for the student, but this is inefficient in case i hav more options as there is large amt of data replication.
pls clarify....
thx a lot...
you probably did not understand my requirement(or maybe i am not understanding your solution)....
What is need is this:
there is a form, say P1, where the user specifies whether he is a teacher/student.
Irrespective of his answer, he is re-directed to P2 on submission of P1.
Now, P2 is also a form. If the person == teacher, then P2 (also a form) contains some text field, and a drop-down-list, DDL1.
On the other hand, if person == student, then P2 contains the SAME text fields(as in the case of teacher), but a different drop-down-list, say DDL2.
I can do this using 2 different forms, one for the teacher and 1 for the student, but this is inefficient in case i hav more options as there is large amt of data replication.
pls clarify....
thx a lot...
Do a conditional on which drop down to present.
php Syntax (Toggle Plain Text)
<?php if($person=="teacher"){?> <select name="teacher"> <option value="option1t">option1</option> <option value="option2t">option2</option> <?php }else{?> <select name="student"> <option value="option1s">option1</option> <option value="option2s">option2</option> <?php }?> </select>
![]() |
Similar Threads
- Did Hubby Put Spyware on My PC??! (Viruses, Spyware and other Nasties)
- Starting Over (Windows NT / 2000 / XP)
- Security Related Recycle Bin Problem (Windows NT / 2000 / XP)
- Using an entire Hard Drive for Virtual Memory (Motherboards, CPUs and RAM)
- Reply With history ..Hmm..interesting. Lotus Notes problem (Windows NT / 2000 / XP)
- have you ever abused ur powers? (Geeks' Lounge)
- Accelereated Reader (Windows 95 / 98 / Me)
- Mac to PC Network keeps disconnecting (Networking Hardware Configuration)
- Fast data storage (C++)
Other Threads in the PHP Forum
- Previous Thread: Help, Dynamic Subject for mail script
- Next Thread: Array echoing problem
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array basics beginner binary broken cakephp checkbox class cms code cron curl database date datepart directory display download dynamic echo email error file files folder form forms function functions google head href htaccess html image include insert integration ip java javascript joomla limit link list login loop mail menu mlm mod_rewrite multiple mysql number oop parse password paypal pdf php phpmyadmin problem query radio random recourse recursion regex remote script search seo server sessions sms soap source space sql structure syntax system table tutorial update upload url validation validator variable video web webdesign xml youtube






