Update problem to mySQL with PHP please help
Posted: Wed Jul 09, 2008 11:12 am
i have a problem whit this,.
im sending 2 variables from flash to a php page that has to update some fileds on the data base.
the flash button send this:
on (release) {
numDepto = 201;
torre= "A";
getURL ("clicks.php", "_blank", "POST");
}
and the php page has this script
<?
$torre= $_REQUEST['torre'];
$numDepto = $_REQUEST['numDepto'];
?>
<?php
$con = mysql_connect("marala","xxxxxx","xxxxxx");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("my_db", $con);
mysql_query("UPDATE maralaTorres SET clicks=clicks+1 WHERE tower='$torre' AND numDepto = '$numDepto'");
mysql_close($con);
?>
<p><?php echo $_REQUEST['torre']; ?></p>
<p><?php echo $_REQUEST['numDepto']; ?></p>
<p><?php echo $_REQUEST['id']; ?></p>
can any one help me figuring this out what is wrong with my php script that it doesnt update the field on table.
THANKS
im sending 2 variables from flash to a php page that has to update some fileds on the data base.
the flash button send this:
on (release) {
numDepto = 201;
torre= "A";
getURL ("clicks.php", "_blank", "POST");
}
and the php page has this script
<?
$torre= $_REQUEST['torre'];
$numDepto = $_REQUEST['numDepto'];
?>
<?php
$con = mysql_connect("marala","xxxxxx","xxxxxx");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("my_db", $con);
mysql_query("UPDATE maralaTorres SET clicks=clicks+1 WHERE tower='$torre' AND numDepto = '$numDepto'");
mysql_close($con);
?>
<p><?php echo $_REQUEST['torre']; ?></p>
<p><?php echo $_REQUEST['numDepto']; ?></p>
<p><?php echo $_REQUEST['id']; ?></p>
can any one help me figuring this out what is wrong with my php script that it doesnt update the field on table.
THANKS