Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing values between PHP pages without navigation

 
Maya Naga
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • 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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand what the issue is.
 
mahesh shinde
Ranch Hand
Posts: 69
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Ajax to make a call to the server to get the value.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic