• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Passing values between PHP pages without navigation

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all...
As i am new to php, i have the following doubt.
Say for an example, i have homepage form with few textfields and radio buttons. i have assigned method='get' where am passing values to another page . My doubt is am going to include a combo box with items such as Ravi, Devi, etc. when the user selects any item, it want to load relevant numbers (ravi->3456, devi->6789,5534) into the textfield. i have developed a code to retrieve the value but the form's method value should be 'POST'. i know it is not possible to use both get and post method at the same time. but how can i solve this problem. is it possible to send the selected item value to another page and retrieve the numbers '3456','6789' without navigating to another page.
my sample code for combo box:




i have included it into my homepage as follows: it works successfully but problem is , when i enter other textfields and select this combo value it automatically refreshes the other fields and fields become empty.



any ideas. please some one guide me some sample codes on how to do it.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand what the issue is.
 
Ranch Hand
Posts: 69
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you want to fill textbox from dropdownlist.
means if you select some value from DropDownlList ,your textbox get filled with some value .

 
Maya Naga
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Name Number
-------- -----------
ravi 5678
devi 8907
sam 2323,4567

say for an example the billing_numbers table will contain data similar as above. in my homepage i'll list the combobox with the name values which is retrieved using query. when the user selects 'ravi' from combobox i need to pass '5678' to the textfield value. this is what i did. since we cannot do this in single page, is it possible to retrieve the value '5678' from another php page where the query result exists without navigating to that page.

am i clear now?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use Ajax to make a call to the server to get the value.

Eric
 
It's just like a fortune cookie, but instead of a cookie, it's pie. And we'll call it ... tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic