• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using a Variable with AJAX  RSS feed

Jc Williams
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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,


On tsearsh12.php, I have:

On votes12.php, I have:

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!