# XML Guestbook with PHP

**URL:** <https://forum.kirupa.com/t/xml-guestbook-with-php/58481>\
**Category:** flash\
**Created:** [July 22, 2004, 7:35pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481 "2004-07-22T19:35:34Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![ofi](https://avatars.discourse-cdn.com/v4/letter/o/df788c/32.png) [@ofi](https://forum.kirupa.com/u/ofi)\
**Post date:** [July 22, 2004, 7:35pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/1 "2004-07-22T19:35:34Z")

</div>

Hi  
I have uploded the files, but i am not sure how to make it work.  
[http://www.koddinn.com/xml\_guestbook/](http://www.koddinn.com/xml_guestbook/)

I have read thru this [http://www.kirupa.com/web/xml\_guestbook2.htm](http://www.kirupa.com/web/xml_guestbook2.htm)  
without of luck, i am new in this flash, can someone help here, am i doing something wrong ??

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2004, 4:26pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/2 "2004-07-23T16:26:18Z")

</div>

You’ve uploaded the FLA but not the HTML and SWF files, so first publish your movie and upload those.  
Then make sure that the permissions on the XML file are sety properly so it can be written to.

Hope that helps.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2004, 9:41pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/3 "2004-07-23T21:41:53Z")

</div>

Hi

I have publish this now, but when i write in the book, it wont show.  
[http://www.koddinn.com/xml\_guestbook/guestbook.html](http://www.koddinn.com/xml_guestbook/guestbook.html)

The permission on the XML file is CHMOD 777  
Has i forgot something?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2004, 11:34am UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/4 "2004-07-25T11:34:20Z")

</div>

If you look at the third page of the tut you’ll see that the XML file you start with should look like this:

```php

<?xml version="1.0"?>
<guestbook>
</guestbook>

```

yours seems to be totally empty.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2004, 12:50pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/5 "2004-07-25T12:50:21Z")

</div>

Hi  
now it work fine, just one thing, does everyone who write the book have to refresh to see the message, does it not autorefresh or…

thx

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2004, 5:11pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/6 "2004-07-25T17:11:04Z")

</div>

if you click on “Add a message” you should see your message directly without having to refresh the page.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2004, 6:55pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/7 "2004-07-25T18:55:51Z")

</div>

it dont do that, i have to refresh the page to see the message,

test it  
[http://www.koddinn.com/xml\_guestbook/guestbook.html](http://www.koddinn.com/xml_guestbook/guestbook.html)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2004, 8:39pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/8 "2004-07-25T20:39:46Z")

</div>

I see.  
you didn’t by any chance make any changes to the AS or PHP?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2004, 9:26pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/9 "2004-07-25T21:26:23Z")

</div>

I uploaded the orginal php file

\<?php  
$file = fopen(“guestbook.xml”, “w+”) or die(“Can’t open XML file”);  
$xmlString = $HTTP\_RAW\_POST\_DATA;  
if(!fwrite($file, $xmlString)){  
print “Error writing to XML-file”;  
}  
print $xmlString."  
";  
fclose($file);  
?\>

seems to be working now

thx for this great script

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2004, 7:16am UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/10 "2004-07-26T07:16:35Z")

</div>

no problem 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 17, 2004, 3:11pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/11 "2004-09-17T15:11:04Z")

</div>

hi,  
could someone check [THIS](http://members.cox.net/hamidb4/guestbook.html) and help me figure out why when you add a message it does not send. I have not alter the files. thank you.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 17, 2004, 7:54pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/12 "2004-09-17T19:54:37Z")

</div>

I think you forgot to change permissions on the XML file (CHMOD). Set it to 666 (readable and writable by everyone). That should do it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 17, 2004, 8:52pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/13 "2004-09-17T20:52:52Z")

</div>

Thank you Flashmatazz,  
I believe that site does not support php because I tried a different approach and it seems to be working now. Please check THIS

well it was working off my server(my computer), and I tested it a few times. It doesn’t respond now and I don’t know why.  
What could be wrong now. By the way, where am I suppose to look for CHMOD?  
appreciate it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 17, 2004, 9:13pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/14 "2004-09-17T21:13:09Z")

</div>

It looks like it is working. Can someone please varify the link in the post #13. Thanks  
BTW/ Flashmatazz you have built this car and I don’t seem to be able to drive it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 19, 2004, 7:20pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/15 "2004-09-19T19:20:52Z")

</div>

Hi  
I am editing the text to [font=Arial] **_Icelandic_** , [/font]  
[http://www.koddinn.com/xml\_guestbook/guestbook.html](http://www.koddinn.com/xml_guestbook/guestbook.html)

When i let the mouse go over the **Skrifa í bók** button, other text comes \*\*Add a message, \*\*how can i let that text be same **Skrifa í bók** on mouseover

and is there a way to add in \*\*Website \*\*in the fill form

sorry my English

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 20, 2004, 12:35pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/16 "2004-09-20T12:35:07Z")

</div>

No need, found it

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 23, 2004, 10:36pm UTC](https://forum.kirupa.com/t/xml-guestbook-with-php/58481/17 "2004-09-23T22:36:14Z")

</div>

is there a way to add in Mail and Webpage, how is it done ??
