need help in php forms..plz

Thread Solved

Join Date: Dec 2008
Posts: 38
Reputation: wwwmadeasy is an unknown quantity at this point 
Solved Threads: 0
wwwmadeasy wwwmadeasy is offline Offline
Light Poster

need help in php forms..plz

 
0
  #1
Dec 23rd, 2008
hi there ...

i want to Handel a select field in php but i could not ..so i was wondering if someone can help....


what i want is there will numbers from 3 to 40 listed in select field and when user select 3
3 text box will appear and if he select 10 then 10 box appear ....and so on

thanks in advance...
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 141
Reputation: robothy is an unknown quantity at this point 
Solved Threads: 19
robothy robothy is offline Offline
Junior Poster

Re: need help in php forms..plz

 
0
  #2
Dec 23rd, 2008
What have you tried? Please post your existing code.

And a small hint would be for you to use the value from the select box in a for loop...

R.
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 20
Reputation: manish.s is an unknown quantity at this point 
Solved Threads: 1
manish.s manish.s is offline Offline
Newbie Poster

Re: need help in php forms..plz

 
0
  #3
Dec 23rd, 2008
  1. <html>
  2. <head>
  3. <script language="JavaScript">
  4. function make_textbox(no)
  5. {
  6. if(no < 1)
  7. return false;
  8.  
  9. var my_textbox = "";
  10.  
  11. for(var i=0;i<no;i++)
  12. {
  13. my_textbox += "<br>Text Box "+eval(i+1)+": <input type='text' name='textfield["+i+"]'>";
  14. }
  15.  
  16. document.getElementById("text_id").innerHTML = my_textbox;
  17. }
  18.  
  19. </script>
  20. </head>
  21.  
  22. <body>
  23.  
  24. <form name="myfrm">
  25.  
  26. Select Number Of TextBox : <select name="select_num_text" onChange="JavaScript:make_textbox(this.value);">
  27. <option value="">Select</option>
  28. <?php
  29.  
  30. for($i=3;$i<=40;$i++)
  31. {
  32. echo "<option value='".$i."'>".$i."</option>";
  33. }
  34. ?>
  35. </select>
  36. <br>
  37. <div id="text_id"></div>
  38. </form>
  39. </body>
  40. </html>
-- Manish Singh
manish.s@neuralit.com
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 38
Reputation: wwwmadeasy is an unknown quantity at this point 
Solved Threads: 0
wwwmadeasy wwwmadeasy is offline Offline
Light Poster

Re: need help in php forms..plz

 
0
  #4
Dec 23rd, 2008
dear Manish Singh

thanks a lot man for this ..it was what i am looking for thanks man ...
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 20
Reputation: manish.s is an unknown quantity at this point 
Solved Threads: 1
manish.s manish.s is offline Offline
Newbie Poster

Re: need help in php forms..plz

 
0
  #5
Dec 23rd, 2008
Always Welcome....
-- Manish Singh
manish.s@neuralit.com
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 1
Reputation: jesirobendebua is an unknown quantity at this point 
Solved Threads: 1
jesirobendebua jesirobendebua is offline Offline
Newbie Poster

Re: need help in php forms..plz

 
0
  #6
Dec 23rd, 2008
and another one with jQuery ( my suggest : learn it!!

preview: http://lostinchevrolet.co.cc/wp-cont...ds/wwwmadeasy/

download: http://lostinchevrolet.co.cc/wp-cont...wwwmadeasy.zip
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 20
Reputation: manish.s is an unknown quantity at this point 
Solved Threads: 1
manish.s manish.s is offline Offline
Newbie Poster

Re: need help in php forms..plz

 
0
  #7
Dec 23rd, 2008
Do you want same out put using jquery ?
if yes i will be happy to help...
-- Manish Singh
manish.s@neuralit.com
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 38
Reputation: wwwmadeasy is an unknown quantity at this point 
Solved Threads: 0
wwwmadeasy wwwmadeasy is offline Offline
Light Poster

Re: need help in php forms..plz

 
0
  #8
Dec 23rd, 2008
thanks to Manish Singh he totaly solve my problem
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 38
Reputation: wwwmadeasy is an unknown quantity at this point 
Solved Threads: 0
wwwmadeasy wwwmadeasy is offline Offline
Light Poster

Re: need help in php forms..plz

 
0
  #9
Dec 23rd, 2008
Manish Singh one more thing how i can submit these data to database? thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 20
Reputation: manish.s is an unknown quantity at this point 
Solved Threads: 1
manish.s manish.s is offline Offline
Newbie Poster

Re: need help in php forms..plz

 
0
  #10
Dec 23rd, 2008
Please let me know structure of your table.
-- Manish Singh
manish.s@neuralit.com
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum


Views: 1007 | Replies: 17
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC