[PHP] PHP/MySQL problems!

Hi, i have a problem using php/mysql and flash. i have a swf, in this swf i have a input text with the Var: ids and a button that has the actionscript
[AS]
btn.onPress = function () {
getURL(“del.php”, _blank, “POST”);
}
[/AS]

and a php file with this code inside:



<?php
/* CONNECTION */
$hostname = "localhost";
$database = "my_database";
$username = "root";
$password = "";
$link = mysql_connect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR); 
mysql_select_db($database) or die('Could not select database $database!');
/* END CONNECTION */

$nr_crt = $_POST['ids'];
//$nr_crt = 4;

$delete = mysql_query("DELETE FROM flash WHERE id = '$nr_crt'", $link) or die(mysql_error());
echo "$nr_crt";


?>


the script shows me what i type in my input text in flash(in php), but he doesn’t connect to my_database and delete the id. so this script is not working for my_database. but if make the php script like this:



<?php
/* CONNECTION */
$hostname = "localhost";
$database = "electrotown";
$username = "root";
$password = "";
$link = mysql_connect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR); 
mysql_select_db($database) or die('Could not select database $database!');
/* END CONNECTION */

//$nr_crt = $_POST['ids'];
$nr_crt = 4;

$delete = mysql_query("DELETE FROM flash WHERE id = '$nr_crt'", $link) or die(mysql_error());
echo "$nr_crt";


?>


everything is working ok.

Any ideas how to resolve this?
Thank you.