I’ve been working on a real estate program to run inside of flash for a few weeks now. It pulls info from an sql database, through php, out as xml and then into flash. I got most of this working thanks to items on this forum which is why i am trying here for a solution to my new problem.
The input from database worked perfectly so now I am building a search engine into the first frame to allow users to search based on categories. I created two input text categories for a min price and max price. These work and the output frame gives me the proper listings. The next item for searching is region. As soon as I put this in I started receiving an error:
TypeError: Error #2007: Parameter text must be non-null.
at flash.text::TextField/set text()
at omgworking5_fla::MainTimeline/ParseVilla()
at omgworking5_fla::MainTimeline/LoadXML()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
I had this error once before, when I input variables that made the resulting table empty. However, when I take the php string that is generated here it returns 2 entries from the table. This error continues even if I comment out the line which adds the region string to my url line. The only way to stop the error is to remove the region section from my php code:
$pricelow = $_GET[‘pricelow’];
$pricehigh = $_GET[‘pricehigh’];
$region = $_GET[‘region’];
$query = “SELECT * FROM buyvillas WHERE price BETWEEN ‘$pricelow’ and ‘$pricehigh’ [COLOR=Red]AND region = ‘$region’[/COLOR]”;
$result = mysql_query($query);
If I remove the section in red it works again. If I include only the section in red, removing the price search, I get the error. Through all of this though, putting the generated url into a web browser gives me the correct results.
I’ll leave it at that for now. Hopefully someone has seen this before or has an idea as to why it is happening. If you need me to post more code from my php file or from the flash file let me know.
-Kris