right_side
Posted on 20 Nov 2008 In: My Portfolio

Article / News Management Script

Well I developed this back in 2006, below are some of the feature highlights, our ocmpany is planning to redevelop this product and reduce its price.

Managing large dynamic websites has always been a difficult task for several webmasters, we have developed Flax Article Manager keeping you in mind. By using this system one can easily manage their news and/or articles quite easily. You can easily update your content with almost all web based browsers easily (always check prior to purchase). flaXarticles Manager not only provides you an advance content management system but you can generate revenues by using (turning Adsense On / Off) google adsense.

user posted image
user posted image Overview

It is an advance article publishing system designed to make your life easier by enabling you to publish articles or news to your website quickly and easily with an advance WYSIWYG editor that includes features such as a built-in spell checker, with image, flash files and asset management and many more. Flax Article manager is template based system, so you can easily integrate it with your existing web site design without any problems. Here is what you get after you purchase

+ Free installation support (please contact us for installation)
+ Full PHP Source Code
+ Free updates (12 months)

user posted image General Features Overview

user posted image Web based installer, easy to follow installation process.
user posted image Publish articles / news without any HTML skills.
user posted image Merge within your existing design easily. System is template based, easily change html code.
user posted image Search Engine friendly URLs, generates .html extensions for articles and categories.
user posted image Web based administration system which allows you to manage articles easily.
user posted image Manage user groups and set their permissions.
user posted image User registration system, manage through admin panel.
user posted image Profile management system for registered users (writers).
user posted image Advance search levels, search within articles, titles, categories and / or sub-categories etc.
user posted image Separate Moderation Panel for staff members’ group.
user posted image Email subscription for general users and/or visitors.
user posted image Send HTML based newsletter through admin panel.
user posted image Create HTML content without any HTML skills with advance WYSIWYG editor
user posted image Show short statistics for total authors, articles, categories and views.
user posted image Display a random article on the right side column.
user posted image Post comments and rate articles.
user posted image Show recent and featured articles.
user posted image Provide you RSS feeds to other webmasters.
user posted image Get RSS feeds from YAHOO NEWS (Associated press) with full description.
user posted image Generate revenues from google adsense / turn it on / off for index and article preview individually.

more details about article manager

Tutorial : Recieving data (from MySQL) and displaying in a combo (drop down list box).
Level : Intermediate

This is very basic tutorial, actually someone requested me through PM but I didnt have time to repond him quickly, so here it is now.I assume you already know how to insert data into tables.or read the following tutorial before reading this

Creating table with MySQL and PHP
Retreiving data from MySQL table

Ok - I assume you have already created a table called category..
you have added a few categories into this table, e.g swishmax, swish 2, flash mx and photoshop.
the field name is cat_name which we will use in next step to fetch data.
 
here is the quickest way.

echo’<select name=”categories”>’;

$res=mysql_query(”select * from category”);
if(mysql_num_rows($res)==0) echo “there is no data in table..”;
else
for($i=0;$i<mysql_num_rows($res);$i++) {
$row=mysql_fetch_assoc($res);
echo”<option>$row[cat_name]</option>”;
}
echo’</select>’;

Description of line echo’<select name=”categories”>’;
this is simple text for creating a combo in html, we give it a name becuase we will have to use this name again when any category is selected, for example someone has seelcted the flash mx category, then the variable categories will have a value flash mx..

Description of line $res=mysql_query(”select * from category”);
this is simple query for fetching all fields form table. But you can use different if you dont want to fetch all fields, you may use WHERE clause to make it more specific.

Descrition of if(mysql_num_rows($res)==0) echo “there is no data in table..”;
this will simply tell if there is any data in the table or the table is empty.

for() loop will simply fetch all the categories added into table and display.

echo’</select>’; is simply closing tag for the combo box.

I hope it will help someone to figure how is a dyanmic combo box is created while recieveing data from MySQL

This tutorial will demonstrate how to retrieve data from tables.

LEVEL : BEGINNER

I assume that you have read tutorial of adding data into tables. Read here.
I will ty my best to keep it as easy as I can.

Functions we will use :
mysql_fetch_assoc();
mysql_num_rows();


Ok - now I assume that you have read the above tutorial I mentioned in which we inserted data into table name as members. Now suppose we have a table named as “members” and it has the following fields.

id, name and email.

and we have 3 members registered (means we have 3 rows) here they are (the data in members table)
1 Roman abc@swish-db.com
2 Imran xyz@swish-db.com
3 Kamran asd@swish-db.com

so these are the total values inserted in table “members”. Now I will make a PHP file fetch.php which will retrieve data from members table.


$res=mysql_query(”SELECT * FROM members”);
if(mysql_num_rows($res)==0) echo “There is no data in the table”;
else

for($i=0;$i$row=mysql_fetch_assoc($res);
echo “ID : $row[id] Name : $row[name] Email : $row[email]“;
}
?>


What is mysql_num_rows ?



This function returns the number of rows effected by SELECT statement. You can use different clauses in SELECT statement, for exmaple you retriev the name of member whose ID is 2. which is IMRAN, so you will use query like this. If there is not data in table it will diplay the error “There is no data in the table”..

$res=mysql_query(”SELECT name FROM members WHERE id=2″);

now we have used WHERE clause in the above statement.

What is mysql_fetch_assoc() ?


This function fetches a a result row as associatve array, and returns an associatve array. In other meaning it fetches the result from the row.

In the for() loop I have displayed the fetched result. So the output of this file will be

1 Roman abc@swish-db.com
2 Imran xyz@swish-db.com
3 Kamran asd@swish-db.com

NOTE : Dont forget to include config.php at the top, or in simple words, dont forget to connect to mysql before you check the fetch.php

I hope it was very easy to understand, however if you have ny questions please feel free to ask.

Very Basic Tutorial which will demonstrate how to connect with MySQL.

LEVEL : BEGINNER

Every database has its users and password. So to connect to a database you must know Database name, username and password running on a host. You cannot perform any other functions unless the connection to databse is established. If you have already used the mysql_connect() function to establish a connection and again you try to connect with the same function, it will not establish a new connection, but it will return the old connection which is already established.

Syntax : mysql_connect(Char HOST, CHar USER, Char Password);
Example : mysql_connect(”localhost”,”username”,”password”);

By using mysql_connect(), the connection is established, but now you have to choose a database to work on, for example there many other databases on the system, so you have to select the appropriate one, on which you will be working. So for example the database I wish to select is swishdb. So I will use the following function right after the mysql_connect()..

mysql_select_db(”swishdb”);

But its good approach to define your variables somewhere in configuration
files such as :

$dbhost = “localhost”;
$dbname = “swishdb”;
$dbuser = “ali”;
$dbpass = “roman”;

and use them like this.

mysql_connect ( $dbhost, $dbuser, $dbpass)or die(”Could not connect: “.mysql_error());
mysql_select_db($dbname) or die(mysql_error());

The function die() will not let the upcoming procedure or function work or execute if any error occurs. mysql_error() function displays the error occurs. There is another function which also displays the error number that is mysql_errno(). So if you are making all in one file named as config.php then it will look like this.

<?
$dbhost = “localhost”;
$dbname = “swishdb”;
$dbuser = “ali”;
$dbpass = “roman”;
mysql_connect ( $dbhost, $dbuser, $dbpass)or die(”Could not connect: “.mysql_error());
mysql_select_db($dbname) or die(mysql_error());
?>

So this is all about how to connect to database. There are only 2 point, one is to establish connection with database with mysql_connect() and the second point is to select datatase using mysql_select_db();

I hope you find this tutorial useful. This is only written for the newbies who learn to connect to database, I will be writing some more detailed tutorials.