Flash Vista - Etusivu
Newest Cool Site
The Two Tales
Site info | Archive
Main Navigation
Etusivu
Uudet linkit
Parhaat äänet
Suositut
Poimintoja
Etsi

Flash Tutorials
Flash Resources
Flash News
Flash Templates
Flash Intro Templates
Website Templates
Flash Games
Flash Books
FlashVista Polls
Sitemap


Random Link
English
Tokidoki
Site info | Get another
FlashVista
Kirjaudu
Rekisteröidy
Liity

Lisää linkki
Muokka linkki
Favorites
Ehdota kategoriaa

Advertise with us
Support us
Credits / Thanks
Contact

Flash Templates:

More Templates ...

Postituslistalla
Käyttäjä

Salasana



Rekisteröidy
Forgot password?
Partner websites
Free Hit Counter
Free Seo Tools
Free Tutorials
Free Video Tutorials
Forum signatures
Best Free Scripts
Wii Fit
Wii Fit News
Cool Tech Gadgets
Other Resources
Suosittele kaverille
suosittele kaverille sivustoa


Postituslistalla
Status: Et ole kirjautunut

Suomi English German French Spanish Italian Portuguese Russian Polish Finnish Dutch Swedish Thai Romanian Traditional Chinese Simplified Chinese
EtsiEt ole kirjautunut
hakusana: Etsi sanaa: Laajennettu haku


MySQL/PHP Driven Flash Guestbook


NEW Flash Tutorials in Video Format - Powered by LearnFlash.com: 45 minutes of flash tutorials now available in streaming format or download. Topics Include flash for beginners, text effects, actionscripting, audio/video, flash 8 and more.


Download the source file for this tutorial Printer version



By Joseph Miller
http://www.indivision.net


This is the first of a series of open-source applications that I intend on releasing that take advantage of the MySQL/PHP/Flash combination. By storing the guestbook entries in a database, you will be able to more easily manage and delete entries if necessary. Also, instead of loading the entire set of entries (as I have seen many flash guestbooks do) this book loads one entry at a time which is much quicker. And it even comes with a pre-loader built in! This book is a great project for designers who are new to making flash work with the back-end.

In order to use the files and follow this tutorial, you will need access to a MySQL database and a server that supports PHP.

Setting Up The Database

I have submitted a tutorial that explains how to set up a database. It's available on FlashVista as 'Setting up a MySQL database: for flash designers'. The same tutorial is also available on my home site at http://www.indivision.net in the fla section (chapter2 'DB4flash'). If this is your first project involving a database, I highly recomend that you follow that tutorial completely (including the setup of phpmyadmin) before attempting to continue with this tutorial.

Open the text file 'book.sql'. Cut and paste its entire contents into the query box of your phpmyadmin (see above tutorial for explanation) and click 'go'. The table will be created in your database that will eventually hold the guestbook entries.

Setting Database Variables & Uploading

Open the file called 'include.inc' located in the php directory. Enter the username, password and database name for the database that you created like so:


$DBhost = "localhost";
$DBuser = "yourUSERname";
$DBpass = "yourPASSWORD";
$DBName = "yourDATABASEname";


Now, upload the entire contents of the zip file included with this tutorial (except for the .fla file and the documentation) to your server. Be sure that the directory structure of the zip file is the same way you are uploading the book. In other words, all of the .php files and the .inc file must be in the 'php' directory which must be in the same directory as the guestbook.swf.

Final Notes

That's it. Point your URL to guestbook.html and you can enter a few test entries. Go back to your phpmyadmin or other database manager and delete the test entries.

NOTE: There is a flaw in the guestbook that becomes apparent once new entries are entered after others have been deleted. Sometimes the order of the entries gets mixed up because the new entries are placed in the spots where deleted entries used to be. It is possible to fix this problem by altering the PHP code but I wanted to keep everything simple and easier to learn from.

SECURITY NOTE: It is very important that you protect the folder where you have uploaded include.inc. If you don't, someone may get acquire access to your database and cause all kinds of problems for you. Check with your host/control panel about how to password protect a folder.

Let me know if you find this useful and please send a link if you use this guestbook on-line somewhere.

If you have any questions, please post them on the forum at INDIVISION. Good luck and I hope this helps.



(Lisätty: 10-28-2003, Osumia: 2, Arvostelut: 3.16, Ääniä: 32, Kommentit: 4)
Add to Favorites Suggest to a Friend

Kommentit: (4)

you rock
(Lisätty: 02-01-2007 Käyttäjä: Guest)

its soo cool ;)
(Lisätty: 12-10-2006 Käyttäjä: Guest)

super thank you very much
(Lisätty: 09-10-2006 Käyttäjä: Guest)

cool tutorial, thanks for posting!
(Lisätty: 07-10-2006 Käyttäjä: Guest)


Lisää kommentti
Please note:
We review EVERY comment before it appears on the site, so please dont waste your time by posting spam links :)
No URLs allowed, no HTML please.

If you register or login first, your review will contain your nickname


Arvostele



Loistava!
todella hyvä
Hyvä
Menettelee
Heikko