# \[PHP\]Write in a HTML?

**URL:** https://forum.kirupa.com/t/php-write-in-a-html/186461
**Category:** programming
**Created:** [April 21, 2006, 11:55am UTC](https://forum.kirupa.com/t/php-write-in-a-html/186461 "2006-04-21T11:55:39Z")
**Posts on this page:** 3
**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: [April 21, 2006, 11:55am UTC](https://forum.kirupa.com/t/php-write-in-a-html/186461/1 "2006-04-21T11:55:39Z")

</div>

Hello guys,

I have a small question, i’m developing a CMS for a site…and now i’m stuck with a little problem: From the backend i send a text to a database and i want that script to be writen in another file.  
Exemple: i send from send.php to mydatabase and after the db it’s filled up with datas i want those datas to be printed (write) in index.php. I’m thinking to use fetch\_array in index.php. Do you have anyideea how i can do this very easy and quicklly?:kommie:

Thank in advance, btibia!

---

<div class="post-metadata">

### Author: ![Seb\_Hughes](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@Seb\_Hughes](https://forum.kirupa.com/u/Seb_Hughes)
#### Post date: [April 21, 2006, 12:56pm UTC](https://forum.kirupa.com/t/php-write-in-a-html/186461/2 "2006-04-21T12:56:46Z")

</div>

If I understand you correctly, you want to extract data from the database.

```php

$getdata = mysql_query("SELECT * FROM databasenamehere");
while ($row = mysql_fetch_array($getdata)) {
All data you want to be pulled form the database goes here

eg.

echo ""$row['rowname']" this will show row data"
}

```

---

<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: [April 25, 2006, 6:57am UTC](https://forum.kirupa.com/t/php-write-in-a-html/186461/3 "2006-04-25T06:57:39Z")

</div>

thx man!
