# \[PHP\]Write into a database

**URL:** https://forum.kirupa.com/t/php-write-into-a-database/182103
**Category:** Uncategorized
**Created:** [March 15, 2006, 3:08pm UTC](https://forum.kirupa.com/t/php-write-into-a-database/182103 "2006-03-15T15:08:16Z")
**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 15, 2006, 3:08pm UTC](https://forum.kirupa.com/t/php-write-into-a-database/182103/1 "2006-03-15T15:08:16Z")

</div>

Hello, i have a small problem. i want to add some values in a database.  
the values are take from flash.

i have this php script:

```php

<?php

$pic = $_POST['img'];
$text = $_POST['desc'];
$url = $_POST['link'];

$db = mysql_connect("localhost","root","");
mysql_select_db("mydatabase");

$insert_query = "INSERT INTO `flash` ( `img` , `text`, `link` ) VALUES ('$pic') , ('$text') , ( '$url' ) ";

?>

```

And in flash i have 3 input text fields, that have the Var: img, desc, link. And a button that has this actionscript:

[AS]

send\_btn.onPress = function () {  
getURL(“writedb2.php”, \_blank, “POST”);  
}

[/AS]

But when i type something in flash and click send button, nothing happens in my database.

the structure of the data base is:

4 fields: ID, IMG, TEXT and LINK  
ID - INT, auto\_increment, PRIMARY  
IMG, TEXT, LINK - VARCHARF, 256

Do you have suggestion how to resolve this, that works?

Thank you.
