# \[PHP\] PHP/MySQL problems!

**URL:** <https://forum.kirupa.com/t/php-php-mysql-problems/182233>\
**Category:** Uncategorized\
**Created:** [March 16, 2006, 3:34pm UTC](https://forum.kirupa.com/t/php-php-mysql-problems/182233 "2006-03-16T15:34:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![btibia](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/btibia/32/1625_2.png) [@btibia](https://forum.kirupa.com/u/btibia)\
**Post date:** [March 16, 2006, 3:34pm UTC](https://forum.kirupa.com/t/php-php-mysql-problems/182233/1 "2006-03-16T15:34:33Z")

</div>

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

<?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

<?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.
