I need a simple guestbook created in Flex that I can put on my web site.
This simple Flex example gives you an example how to create a Guestbook that is very easy to implement into your web site.
This example is based on my previous post, Starting with AMFPHP, so if you haven't worked with AMFPHP before, please read it.
In this example I used AMFPHP benefits to send a simple Actionscript object with the information about user entry in the guestbook. The data is stored in an instance of a class Comment:
package org.zgflex
{
[RemoteClass(alias="org.zgflex.Comment")]
[Bindable]
public class Comment
{
public var id:int;
public var name:String;
public var title:String;
public var email:String;
public var comment:String;
}
}
The same kind of class exists on a server side and I'm using it when I want to get all previous comments and put them in DataGrid.
Note: In this example I tried to give you a simple example how to create a guestbook functionality. There are some other things that you can improve, SQL injection security, data validation in Flex form etc.