Subscribe to RSS
get email updates
home | about | pixDif AIR app | video tutorials
polyGeek.com

Register for 360Flex in DC using the ad below and you will automatically be entered in a drawing for a free ticket. Read more.
place your ad here

Web Premium





Introduction to AMFPHP with Actionscript : Blogroll part 5

March 29th, 2010 . by polygeek

In this episode I’ll add a feature to allow users to submit their own blog to the blogroll. Of course you wouldn’t want people just adding entries and them going live so I’ll also update the blogroll table with an is_approved field. That way you will have control over who gets in and who doesn’t.

view source

Here is the updated Blogroll.php file used in this example. Note: I added a bit to the userAddBlog() method to send an email to the administrator any time an blog entry is added – commented out – and also used mysql_real_escape_string() to prevent code injection.

Don’t forget to update your blogroll table with the is_approved field and then set all existing rows to 1 with: UPDATE `blogroll` SET `is_approved` = 1;

Addendum: I forgot to add this to the video but the getBlogrollByPage() and getBlogrollCount() methods also need a slight update so that they will only select entries that have been approved. They now look like this:

function getBlogrollByPage( $start, $count ) {
	$sql = 	"SELECT * FROM `blogroll`
				WHERE `is_approved` = 1
				LIMIT ".$start.", ".$count;

	return mysql_query( sprintf( $sql ) );
}

function getBlogrollCount() {
	$sql = 	"SELECT COUNT(*) AS 'count'
				FROM `blogroll`
				WHERE `is_approved` = 1;";

	return mysql_query( sprintf( $sql ) );
}

The is_approved = 1 makes sure that only those blogs that have been approved by the administrator will show up.

( Visit the video index. )

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

Introduction to AMFPHP with Actionscript : Blogroll part 4

March 29th, 2010 . by polygeek

Up till now we’ve been downloading the entire contents of the blogroll table. Now it’s time to add paging so that only a few entries are returned from the database at a time. To do that I’ll show you how to send variables to the PHP code and use them to manipulate the data that is selected.

We’ll be expanding on the code from the previous 3 videos. ( Visit the video index. )

view source

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

Introduction to AMFPHP with Actionscript : Blogroll part 3

March 29th, 2010 . by polygeek

Here in part 3 of this series we’ll create a DataGroup to display the buttons inside an ItemRenderer. ( Video Tutorial Index page ) This won’t mean much to you if you’re working in the Flash IDE, without the Flex framework, but it does provide a quick glance into the workflow of displaying data in a Flex based app.

We’ll be working with the code expanded upon in the previous two videos in this series.

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

Introduction to AMFPHP with Actionscript : Blogroll part 2

March 29th, 2010 . by polygeek

In the previous video tutorial in this series we managed to get as far as getting the data from the database to our application. Here we’ll collect the data and prepare to dispatch that to the view where it can be displayed.

The code from the previous video tutorial will get you through this one.

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

Introduction to AMFPHP with Actionscript : Blogroll part 1

March 29th, 2010 . by polygeek

The application that we’ll create together here is very simple. However the tools that you’ll learn here can be used to create an app of incredible complexity.

Here is a look at the finished app. Simple as it is it does cover the essentials of database driven apps:

  • Retrieving data from a database
  • Passing variables to the server to modify the MySQL code
  • Modifying data in the database
  • Adding new data to the database
view source

Here in part one I’ll show you how to set up Flash Builder or your Flash IDE to get started using AMFPHP to connect your Flash based app with a database. I assume that you already have a local server running that can support PHP and you have AMFPHP on that server. If not then check out this short video tutorial on setting up AMFPHP.

Here’s the source code that you’ll need for this project.

If something here has proved valuable to you then feel free to drop a couple of bucks in the tip-jar.

Post to Twitter Post to Delicious Post to Facebook Post to Reddit Post to StumbleUpon


similar posts

« Previous Entries    



polyGeek.com

© Copyright 2008 polyGeek.com / Dan Florio, All Rights Reserved Except Where Explicitly Stated
Web Developement Blogs - Blog Catalog Blog Directory
M2 Websites
Local Directory for Los Angeles, CA

Better Tag Cloud