Hi,
I have this flash/php search engine that works online (but only when i access it with Internet Explorer)
For some reason when i try and run the swf itself from the location of my local apache server it does not process the php code to do the search.
Here is an example of the Flash which takes the input of "name2" and sends it to the PHP. (by the way the links are just examples)
var theXML:XML = new XML();
theXML.ignoreWhite = true;
name2="";
testLVs = new LoadVars();
search.onPress=function(){
testLVs.name2=name2;
testLVs.sendAndLoad("http://www.omarplummer.com/database3/searchTest2.php", testLVs, "POST");
testLVs.onLoad = function(success)
{
if (success)
{
theXML.load("http://www.omarplummer.com/database3/searchTest2.php");
}
}
}
theXML.onLoad = function() {
var nodes = this.firstChild.childNodes;
for(i=0;i<nodes.length;i++) {
theList.addItem(nodes.firstChild.nodeValue,i);
}
nodeTest=nodes.length;
}
Now here is an example of my PHP script
<?PHP
$link = mysql_connect("plummerman.omarplummer.com","plummerman16","******");
mysql_select_db("shoestore");
$name2=$_POST['name2'];
$query = "SELECT * FROM shoe_id where Shoe_type = '$name2'";
$results = mysql_query($query);
echo "<?xml version=\"1.0\"?>\n";
echo "<firstName>\n";
while($line = mysql_fetch_assoc($results)) {
echo "<item>" . $line["Shoe_type"] . "</item>\n";
}
echo "</firstName>\n";
mysql_close($link);
?>
Like i stated b4, this search engine actually works from a webbrowser but when executing the swf file by itself from the folder of the local host, it doesn't seem to process the information from the PHP file.
Can any1 help me, THX.