Guestboook.zip contains:
1.GuestBook.php //you need to initiate a mySQL Database Connection
2.install_guestbook.txt //SQL file
3.Guestbooook.swf
4.Guestbooook.fla
It’s all working for me really nicely… you can see it at www.schranz-com.org … but it has a little bugs… like for example after the Imput is sended the text boxes aren’t clear… or if it requireding valid name , e-mail adress the clear button just won’t clear. Also I would like to ask how to import special characters from MySQL to text… by special characters I mean for example “+” … also if any of you know any tutorial or something on how to insert smilies…
AS for clear button:
on (release) {
yourname.text = “”;
youremail.text = “”;
yourcomments.text = “”;
}
AS for submit button:
on(release) {
yourname = yourname.text;
youremail = youremail.text;
yourcomments = yourcomments.text;
// Check variable data
if (yourname eq "") {
gb_status.text = "Required: Name";
} else if (youremail eq "") {
gb_status.text = "Required: Email Address";
} else if (!youremail.length || youremail.indexOf("@") == -1 || youremail.indexOf(".") == -1) {
gb_status.text = "Required: Valid Email Address";
} else if (yourcomments eq "") {
gb_status.text = "Required: Comments";
} else {
gb_status.text = "Please wait...";
newEntry = new LoadVars()
newEntry.ref = this
newEntry.submit = "Yes"
newEntry.yourname = yourname
newEntry.youremail = youremail
newEntry.yourcomments = yourcomments
newEntry.sendAndLoad("GuestBook.php?action=write&r="+random(999), newEntry, "POST")
newEntry.onLoad = function(success){
if(success){
gb_status.text = this.gb_status;
_parent.read.loadEntries("Default", 10);
yourname.text = "";
youremail.text = "";
yourcomments.text = "";
}
}
}
}
Moustly it’s gonna be a path problem… I have a hard time with that… thnx