• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using a Variable with AJAX

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Below I have posted code that I have on two different PHP files, tsearch12.php and votes12.php. The code works great. The file "tsearch12.php" uses AJAX to go to votes12.php to perform some functions. However, the first page has a variable called "find." These two pages only work together when the variable "find" equals "santafe." I would like them to work together regardless of what "find" equals. In other words, I would like to replace the table name "santafe" in votes12.php with the variable "find," but I want the variable "find" to equal the same value in both tsearch12.php and votes12.php. The variable "find" is going to tsearch12.php from another file, which has a simple HTML form with "<form action="tsearch12.php" method="post">" and "<input type="text" name="find" size="55"/>". Anyway, how do I use the variable "find" in votes12.php?

Thanks in advance,

John

On tsearsh12.php, I have:




On votes12.php, I have:

 
A sonic boom would certainly ruin a giant souffle. But this tiny ad would protect it:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic