Needed FLASH/PHP Wiz! Help! Code won't work.?

christsealed

New member
Okay, I've got two buttons and two dynamic textfields:

here is the flash coding for the buttons:

on(press) {
_root.gotoAndStop(22);
_root.mens.text == "mens";
}

on (release) {
categories = new LoadVars();
categories.mens = mens.text
categories.sendAndLoad("categories.php", categories, 'POST');
categories.onLoad = function() {
_root.cart.gotoAndStop(1);
}
}

The coding is identical for the women's button, except for the naming. Okay. Basically, I want for the textfield's default value to be 'mens' and that value to be posted to the categories.php.

Now here's the php:

<?php
require("dbdetails.php");

$mens = $_POST['mens'];
$womens = $_POST['womens'];

if($POST ['mens'] = true){
GLOBAL $db, $dbname;
$sql = "SHOW TABLES WHERE Tables_in_`" . $dbname."` NOT LIKE `wmn%`;";
$result = mysql_query($sql);
if (!$result) {
echo '$errorDescription =could not list table, MySQL Error: ' . mysql_error();
exit;
}
$XML="<categories>";
while ($row = mysql_fetch_row($result)) {
if($row[0]!="paypal" && $row[0]!="2co" && $row[0]!="authorize_orders") {
$XML.= "<Product><name>". $row[0] . "</name><xmlPath>connector.php?tableName=". $row[0] ."</xmlPath></Product>";
}
}
$XML.= "</categories>";
mysql_free_result($result);
echo $XML;
} else {
GLOBAL $db, $dbname;
$sql = "SHOW TABLES FROM `" . $dbname."` LIKE `wmn%`;";
$result = mysql_query($sql);
if (!$result) {
echo '$errorDescription =could not list table, MySQL Error: ' . mysql_error();
exit;
}
$XML="<categories>";
while ($row = mysql_fetch_row($result)) {
if($row[0]!="paypal" && $row[0]!="2co" && $row[0]!="authorize_orders") {
$XML.= "<Product><name>". $row[0] . "</name><xmlPath>connector.php?tableName=". $row[0] ."</xmlPath></Product>";
}
}
$XML.= "</categories>";
mysql_free_result($result);
echo $XML;
}

?>

From what I can tell, all the coding is correct, but still nothing happens. What gives? Any clues?
 
Back
Top