OK here is the current problem im using this code in flash
clickButton.onRelease = function() {
clicked = new LoadVars();
clicked.num = 1;
clicked.ran = random(20000);
clicked.sendAndLoad("
clicked, "_POST");
delete clicked;
//the above line may not be needed
};
and the php file is
<?php
print "<p align='center'>";
$username = "BLAH";
$password = "BLAH";
$hostname = "BLAH";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
print "Connected to MySQL<br>";
$selected = mysql_select_db("test_table",$dbh)
or die("Could not select test_table");
print 'Selected "test_table" database<br>';
$result = mysql_query('SELECT id FROM stuff');
if (!$result) {
die('Invalid query: ' . mysql_error());
}
else{print 'Queried table "stuff"<br>';}
$row = mysql_fetch_array($result);
$new = "$row[id] + 1";
$result = mysql_query("UPDATE stuff SET id = $new");
if (!$result) {
die('Invalid query: ' . mysql_error());
}
else{print 'Queried table "stuff"<br>';}
print "$row[id]";
print " </p> ";
?>