Saturday, September 24, 2011

PHP Command Line script - cli script

php filesize

http://php.net/manual/en/function.filesize.php

I have a cli script running that use the filesize function on a ssh2_sftp connection. It has the >2Gb limit issue, while it does not have that issue locally. I have managed to get around this by doing a "du -sb" command through ssh2_shell.

The following function takes the ssh2_connect resource and the path as input. It may not be neat, but it solves the problem for the moment.

function fSSHFileSize($oConn, $sPath) {
if(
false !== ($oShell = @ssh2_shell($oConn, 'xterm', null, 500, 24, SSH2_TERM_UNIT_CHARS))) {
fwrite($oShell, "du -sb '".$sPath."'".PHP_EOL);
sleep(1);
while(
$sLine = fgets($oShell)) {
flush();
$aResult[] = $sLine;
}
fclose($oShell);
$iSize = 0;
if(
count($aResult) > 1) {
$sTemp = $aResult[count($aResult)-2];
$sSize = substr($sTemp, 0, strpos($sTemp, chr(9)));
if(
is_numeric(trim($sSize))) {
$iTemp = (int)$sSize;
if(
$iTemp > "2000000000") $iSize = $iTemp;
}
}
return
$iSize;
}
return
0;
}
?>

Friday, September 23, 2011

Joomla Tooltip - WOW, badass

http://www.nonumber.nl/extensions/tooltips?tab=download


Tooltip with title and text

Hover here to see tooltip

{tip Cool...::This is a tooltip!}Hover here to see tooltip{/tip}

Tooltip with only text

Hover here to see tooltip

{tip This is a tooltip!}Hover here to see tooltip{/tip}

Tooltip with rich text

Hover here to see tooltip

{tip You can use bold, italic, underlined text.
Or use enters and any other markup you want!}Hover here to see tooltip{/tip}

Tooltip with images

You can even make images show in the tooltips and use this - for example - as a gallery:

{tip }{/tip} {tip }{/tip}
{tip }{/tip} {tip }{/tip}
{tip }{/tip} {tip }{/tip}

Or simply place the html in the {tip} tags, instead of the large images, like:

{tip }{/tip}
{tip }{/tip}
{tip }{/tip}
{tip }{/tip}
{tip }{/tip}
{tip }{/tip}

Cool Joomla Site - SCROLLING info on left

http://freestyle-joomla.com/demo

Cool Joomla Site - Translation - GLOBAL

http://www.ofertaweb.ro/

Thursday, September 22, 2011

Good site for SEO

Good site for SEO

http://www.yourgoalbook.com/smart-goals-setting

Wednesday, September 21, 2011

Joomla 1 to 1.5 code migration links

CODE MIGRATION
http://www.kanich.net/radio/site/joomla-migration
http://docs.joomla.org/Upgrading_a_Joomla!_1.0_template_to_Joomla!_1.5
http://www.kanich.net/radio/site/joomla-migration/migration-table
http://www.waltercedric.com/joomla-mainmenu-247/339-joomla-15/1175-components-code-migration-to-joomla-15.html

Saturday, September 17, 2011

Joomla - ROKFeatureTable - really cool

http://demo.rockettheme.com/sep10/extensions/styled-extensions/rokfeaturetable

http://www.rockettheme.com/forum/index.php?f=403&t=108793&rb_v=viewtopic







RokFeatureTable is a template integrated module that is designed to show tabular data in a stylistic, and easy to present manner. The module is downloadable with the other Omnicron extensions.



Image




Core Features




  • Unlimited Rows

  • Extensive data control

  • Highlight Column Control




 



  • Assign custom classes


  • Custom CSS styles

  • Template specific layouts




Usage Examples



  • Price Comparisons

  • Feature Comparisons


  • Service Matrix







Module Configuration



Edit the module from Admin → Extensions → Module Manager → RokFeatureTable.




  • Module Class Suffix: Appends a class for individual styling - featuretable is used on this demo.

  • Highlight Column: Select which of the columns is highlighted by default.

  • Preset Templates: Load a predefined template layout.


  • Layout Settings: See below



Image



Layout Settings



Select Layout Settings to activate the javascript popup. Here you can have up to 6 column, and an unlimited number of rows. For each row you can define class, subline, link and style.



Image



Forum Tutorial: Setting Up RokFeatureTable Module








How To Configure RokFeatureTable Module

1. If you still don't have RokFeatureTable installed, the module can be downloaded with the other Omnicron extensions.

2. In your Joomla administrator panel, go to: ExtensionsModule ManagerRokFeatureTable

3. Here we can set the optional parameters:
3. a) Module Class Suffix : You can put any module suffix if necessary. In Omnicron template, you might want to put "featuretable" (without quotes)



module-class-suffix.png




3. b) Highlight Column : Choose the column you want to highlight by default or choose none if you don't want any column gets highlighted. For example, if we choose "Column 3", it will be shown like the following:


column-highlighted.png





3. c) Preset Templates : There are 2 presets templates for the table, "Browsers" and "Price Table". To make the setup easier and faster, let's load the sample data by clicking the Import button.


preset-templates-table.png




The "Price Table" template is the one shown in the demo site and the following one is the screenshot for "Browsers" table.



browsers-templates.png





4. Configure the layout setup. Here, you will be presented with a interactive grid. You can add/remove columns and rows by following below steps.
4. a) To add column, click the + button like shown in the following screenshot. To remove the column, hover the mouse on the column you want to delete and click the red "Remove" link under it.



column-management.png




4. b) To add row, click the + button and to remove the row, click the - like shown in the following screenshot.



row-management.png





5. You may insert raw text or HTML into the row input boxes.


raw-or-html.png





6. Click the class, subline, link or style buttons to activate new input boxes.
6. a) Class : Wrapping the text inside a div with specified class, for example:



class.png




It will produce the following html code:


6. b) Subline : Adding a subline, for example:



subline.png




It will produce the following html code:
<div class="price">
  <span class="item1">$29</span>
  <span class="item2">per month</span>
</div>


6. c) Link : Wrapping the text inside a link with specified url, for example:



link.png




<a href="http://www.mozilla.com/en-US/firefox/all.html">Firefox</a>


6. d) Style : Adding inline css style, for example:



style.png




It will produce the following html code:
<div style="height: 89px;" class="featuretable-cell bg">
 ⊕ iPhone App<br>
</div>

Wednesday, September 14, 2011

Joomla 1.5 Build Component Tutorial - 1

Lost Flirts - a Joomla 1.5 component from scratch


Update: Paceville.com is now online to check out the interface go here.



lost_flirts_paceville_gui.jpg

Although I got a pretty good picture of how a Joomla component works when I did the extended user registration form it wasn’t really from scratch.


This time though it was time to try and create something from scratch, in a “proper” fashion. We need a Lost Flirts section which will basically be a simple web board where members can post short messages. Other members can then answer with direct messages.


Administrators need to be able to remove any post and the person who created a post needs to be able to remove it. There will however not be any admin interface for this one, the admin needs to be logged in to the front end to be able to remove flirts.



joomla_component_lost_flirts.png

The whole interface will be contained on one page, first the posts at the top, then pagination controls and at the bottom the form. If a person is allowed to remove a post we will show a delete link to the right in each post. Note that the picture to the right is the designer’s take on what the interface should look like. Currently unregistered people won’t be able to use Lost Flirts, that will simplify the form a lot compared to what you see in the image.


Lets’ talk structure, we will have an entry point called lostflirts.php in components/com_lostflirts, this script is currently only loading the controller and will have the controller call a default task if none has been specified in the GET global array.



The controller and table is where everything is happening, the controller will in turn instantiate a view which renders the template, take a look at image to the right to see how everything is structured at the moment. This is kind of the default structure, very little configuration is needed to make stuff happen.


The table script tables/lostflirts.php is used as much as possible to separate concerns and to make as much use of the JTable class as possible.


Note that this tutorial will not go through any kind of packaging, prior to creating all the folders/scripts manually in the components directory I simply ran the following SQL:


  1. CREATE TABLE IF NOT EXISTS `jos_lostflirts` (
  2.   `id` int(21NOT NULL auto_increment,
  3.   `userid` int(21NOT NULL,
  4.   `message` text NOT NULL,
  5.   `date` timestamp NOT NULL default CURRENT_TIMESTAMP,
  6.   `title` varchar(255NOT NULL,
  7.   `flirt_date` date NOT NULL,
  8.   PRIMARY KEY  (`id`)
  9. ENGINE=MyISAM  DEFAULT CHARSET=utf8
  10.  
  11. INSERT INTO `jos_components` (`name``link``menuid``parent``admin_menu_link``admin_menu_alt``option``ordering``admin_menu_img``iscore``params``enabled`VALUES
  12. ('Lost Flirts''option=com_lostflirts'00'option=com_lostflirts''Lost Flirts''com_lostflirts'0'js/ThemeOffice/component.png'0''1);


For more on packaging see here.


Let’s begin with the entry point lostflirts.php:


  1. defined('_JEXEC'or die('Restricted access');
  2. require_once (JPATH_COMPONENT.DS.'controller.php');
  3. $controller = new LostFlirtsController();
  4. $controller->registerDefaultTask('listFlirts');
  5. $controller->execute( JRequest::getCmd('task'));
  6. $controller->redirect();


Not much to add here in addition to what I’ve already stated above, we will render the task listFlirts if the $_GET[’task’] variable is empty.


Let’s move on to controller.php’s complete listing, discussion of each function is below:


  1. defined('_JEXEC'or die();
  2. jimport('joomla.application.component.controller');
  3. class LostFlirtsController extends JController{
  4.     function __construct(){
  5.         parent::__construct();
  6.         $this->user =& JFactory::getUser();
  7.         JTable::addIncludePath(JPATH_COMPONENT . DS . 'tables');
  8.     }
  9.     
  10.     function redirListAll(){ $this->setRedirect(JRoute::_('index.php?option=com_lostflirts')); }
  11.     function getTable(){ return JTable::getInstance('LostFlirts''Table'); }
  12.     
  13.     function create(){
  14.         $post     = JRequest::get('post');
  15.         $row     =& $this->getTable();
  16.         if (!$row->bind($post))
  17.             return JError::raiseWarning(500$row->getError());
  18.         
  19.         $row->userid         = $this->user->id;
  20.         $row->flirt_date     = "{$post['year']}-{$post['month']}-{$post['day']}";
  21.         
  22.         if (!$row->store()) 
  23.             return JError::raiseWarning(500$row->getError());
  24.             
  25.         $this->redirListAll();
  26.     }
  27.     
  28.     function getLostFlirt($id){
  29.         $tbl = $this->getTable();
  30.         $tbl->load($id);
  31.         return $tbl;
  32.     }
  33.     
  34.     function delete(){
  35.         $id = JRequest::getVar( 'id'0'get''int' );
  36.         if($this->isAdmin() || $this->user->id == $this->getLostFlirt($id)->userid)
  37.             $this->getTable()->delete($id);
  38.         $this->redirListAll();
  39.     }
  40.     
  41.     function isAdmin(){
  42.         return in_array($this->user->usertype, array('Super Administrator''Administrator''Manager''Author'));
  43.     }
  44.     
  45.     function isRegistered(){ return $this->user->usertype == 'Registered' || $this->isAdmin(); }
  46.     
  47.     function listFlirts(){
  48.         $doc     = JFactory::getDocument();
  49.         $doc->addScript("components/com_community/assets/window-1.0.pack.js");
  50.         $doc->addScript("components/com_community/assets/script-1.2.pack.js");
  51.     
  52.         $get     = JRequest::get('get');
  53.         $view     =& $this->getView('listflirts''html');
  54.         $limit     = 10;
  55.         $offset = empty($get['offset']) ? 0 : $get['offset'];
  56.         $view->assign("rows"$this->getTable()->getLostFlirtsList($offset$limit));
  57.         $view->assign("admin"$this->isAdmin());
  58.         $view->assign("registered"$this->isRegistered());
  59.         $view->assign("cur_usr_id"$this->user->id);
  60.         $view->assign('pagination'$this->getPagination( $limit ));
  61.         $view->display();
  62.     }
  63.     
  64.     function getPagination($per_page){
  65.         $get = JRequest::get('get');
  66.         $total = $this->getTable()->getFlirtCount();
  67.         if($total < $per_page)
  68.             return array();
  69.         $page_num = ceil($total / $per_page);
  70.         $result = array();
  71.         for($i = 0$i < $page_num$i++){
  72.             $cur             = array();
  73.             $offset         = round($i * $per_page);
  74.             $cur['offset']     = $offset;
  75.             $cur['limit']    = $per_page;
  76.             $cur['current'] = $offset == $get['offset']; 
  77.             $result[]         = $cur;
  78.         }
  79.         return $result;
  80.     }
  81. }


Let’s discuss each function from top to bottom:







__construct: The constructor, we assign the currently logged in user to a member variable because it will be used a lot, we also include our table/model whose code we will get to further down.


redirListAll: Convenience function to redirect to the default task/function which is listFlirts.



getTable: Will instantiate our table.


create: Is called everytime the form is submitted, we do the customary bind() call but we will also set the userid field to the currently logged in user’s id. We will also set the posted flirt date to a normal MySQL date, with the help of the contents of the date dropdowns.


getLostFlirt: Will simply get a lost flirt row with the help of the passed argument.


delete: Will delete a lost flirt with the help of an id, will redirect to the full lost flirts listing. Note that only the owner of the flirt, or someone more powerful than just registered can do this.



isAdmin: Simple ACL function to check if we have something above Guest and Registered.


isRegistered: Simple check to see if the currently logged in user is Registered or higher.


listFlirts: The main function that always renders the GUI. First we get the current document, we then add some JomSocial JavaScripts that are needed in order for the direct messaging to work. We get the first 10 flirts and assign them to “rows” in the view, assign a boolean to the “admin” variable, if we’re above Registered it will be true, assign true to “registered” if we are have registered member. Finally we assign the pagination controls.


getPagination: Will get the pagination controls with the help of the total flirt count, current offset and limit/per page count (10). The current pagination is very simple, there are no page groups, only pages. Hopefully this will be enough since the content displayed is all about freshness, older flirts should be deleted by for instance a cron job, hence there will not be any need for page groups and such.



Let’s move over to the tables/lostflirts.php script:


  1. defined( '_JEXEC' ) or die'Restricted access' );
  2. class TableLostFlirts extends JTable{
  3.     var $id = null;
  4.     var $message = null;
  5.     var $date = null;
  6.     var $userid = null;
  7.     var $flirt_date = null;
  8.     var $title = null;
  9.     
  10.     function __construct(&$db){
  11.         parent::__construct( '#__lostflirts', 'id', $db );
  12.     }
  13.     
  14.     function getFlirtCount(){
  15.         $sql
  16.  = "SELECT DISTINCT COUNT(*) FROM #__users u, #__lostflirts f, #__community_users cu
  17.                 WHERE f.userid = u.id AND f.userid = cu.userid AND u.id = cu.userid"
  18. ;
  19.         $this->_db->setQuery($sql);
  20.         return $this->_db->loadResult();
  21.     }
  22.     
  23.     function getLostFlirtsList($offset$limit){
  24.         $sql
  25.  = "SELECT DISTINCT * FROM #__users u, #__lostflirts f, #__community_users cu
  26.                 WHERE f.userid = u.id AND f.userid = cu.userid AND u.id = cu.userid
  27.                 GROUP BY f.id ORDER by f.date LIMIT $offset, $limit"
  28. ;
  29.         $this->_db->setQuery($sql);
  30.         return $this->_db->loadObjectList();
  31.     }
  32. }


Not much to add here, the only additional info we’ve added to what we already have in JTable is getFlirtCount and getLostFlirtsList which is doing exactly what their names imply.


That was quick, let’s take a look at the view.html.php script:


  1. defined( '_JEXEC' ) or die'Restricted access' );
  2. jimport( 'joomla.application.component.view');
  3. class lostflirtsViewlistFlirts extends JView{
  4.     function display($tpl = null){
  5.         parent::display($tpl);
  6.     }
  7.     
  8.     function prettyDate($date){
  9.         $stamp = strtotime($date);
  10.         return date("j M, Y"$stamp);
  11.     }
  12.     
  13.     function printArrToOptions(&$arr$selected){
  14.         foreach($arr as $item){
  15.             $item = is_int($item) ? str_pad($item2"0"STR_PAD_LEFT) : $item;
  16.             if($item == $selected)
  17.                 echo "<option value=\"$item\" selected=\"selected\">$item</option>";
  18.             else
  19.                 echo "<option value=\"$item\">$item</option>";
  20.         }
  21.         
  22.     }
  23.     
  24.     function yearOptions($selected){
  25.         $this_year = date('Y');
  26.         $years = range($this_year - 2$this_year);
  27.         $selected = empty($selected) ? $this_year : $selected;
  28.         $this->printArrToOptions($years$selected);
  29.     }
  30.     
  31.     function monthOptions($selected){
  32.         $this_month = date('m');
  33.         $selected = empty($selected) ? $this_month : $selected;
  34.         $months = range('01''12');
  35.         $this->printArrToOptions($months$selected);
  36.     }
  37.     
  38.     function dayOptions($selected){
  39.         $this_day = date('d');
  40.         $selected = empty($selected) ? $this_day : $selected;
  41.         $days = range('01''31');
  42.         $this->printArrToOptions($days$selected);
  43.     }
  44. }


We’ve got some helper functions here, this stuff should really be in some library instead of directly in the view. Better than in the template anyway ;)


You might also recognize this stuff from the extended user form. Anyway, the above functions are used to print the date drop downs where we have year, month and day of month.


Over to the template in tmpl/default.php:


  1. <?php // no direct access
  2. defined('_JEXEC') or die('Restricted access');
  3. ?>
  4.  
  5. <?php foreach($this->rows as $usr): ?>
  6. <div class="flirt_cont">
  7.     <img class="float_left" src="<?php echo $usr->avatar ?>" />
  8.     <h1><?php echo $usr->title ?></h1>
  9.     <div class="float_right">
  10.         <?php if($this->registered && $this->cur_usr_id != $usr->userid): ?>
  11.             <a href="javascript:void(0);" onclick="joms.messaging.loadComposeWindow('<?php echo $usr->userid ?>')">Reply</a>
  12.         <?php endif ?>
  13.         <?php if($this->admin || $usr->userid == $this->cur_usr_id): ?>
  14.         <p>
  15.             <a href="<?php echo JRoute::_("index.php?option=com_lostflirts&task=delete&id={$usr->id}") ?>">Delete</a>
  16.         </p>
  17.     <?php endif ?>
  18.     </div>
  19.     <p class="grey">We got together on <?php echo $this->prettyDate($usr->flirt_date) ?></p>
  20.     <p><?php echo $usr->message ?></p>
  21.     <div class="flirt_line"></div>
  22. </div>
  23. <?php endforeach; ?>
  24.  
  25. <div class="flirt_cont">
  26. <div class="pagination_ctrl">
  27. <?php foreach($this->pagination as $num => $page): ?>
  28.     <div class="pagination_<?php echo $page['current'] ? 'current' : 'normal' ?>">
  29.         <a href="<?php echo JRoute::_("index.php?option=com_lostflirts&offset={$page['offset']}&limit={$page['limit']}") ?>"> 
  30.             <?php echo $num + 1 ?>
  31.         </a>
  32.     </div>
  33. <?php endforeach ?>
  34. </div>
  35. <br/>
  36. <br/>
  37. <br/>
  38. &nbsp;&nbsp;&nbsp;<span class="super_headline">Are you missing that special one?</span>
  39. <br/>
  40. <?php if($this->registered): ?>
  41. <script>
  42. function postLostFlirt(){
  43.     if(jQuery("#lostflirt_message").val().length < 5 || jQuery("#lostflirt_title").val().length < 5)
  44.         jQuery("#lostflirt_errors").show("slow");
  45.     else
  46.         jQuery("#lostflirts_form").submit();
  47.     return false;
  48. }
  49. </script>
  50. <div id="lostflirt_errors" class="hide pink">
  51.     &nbsp;&nbsp;&nbsp;The title and/or message field is empty, or almost empty, write some more please.
  52. </div>
  53. <br/>
  54. <form id="lostflirts_form" method="post" action="<?php echo JRoute::_("index.php?option=com_lostflirts&task=create") ?>">
  55. <table>
  56.     <tr>
  57.         <td style="vertical-align: bottom;">
  58.             <span class="pink">*</span> Date:
  59.         </td>
  60.         <td>
  61.             Day: 
  62.             <select name="day" style="width:100px;">
  63.                 <?php echo $this->dayOptions() ?>
  64.             </select>
  65.  
  66.             <span style="margin-left: 40px;">Month:</span> 
  67.             <select name="month" style="width:100px;">
  68.                 <?php echo $this->monthOptions() ?>
  69.             </select>
  70.  
  71.             <span style="margin-left: 40px;">Year:</span> 
  72.             <select name="year" style="width:100px;">
  73.                 <?php echo $this->yearOptions() ?>
  74.             </select>
  75.         </td>
  76.     </tr>
  77.     <tr>
  78.         <td style="vertical-align: bottom;">
  79.             <span class="pink">*</span> Title:
  80.         </td>
  81.         <td>
  82.             <input id="lostflirt_title" type="text" class="inputbox" name="title" value="" style="width:500px;"/>
  83.         </td>
  84.     </tr>
  85.     <tr>
  86.         <td style="vertical-align: top;">
  87.             <br/>
  88.             <span class="pink">*</span> Message:
  89.         </td>
  90.         <td>
  91.             <textarea id="lostflirt_message" name="message" rows="40" style="width:500px;"></textarea>
  92.         </td>
  93.     </tr>
  94.     
  95.     <tr>
  96.         <td></td>
  97.         <td>
  98.             <button class="btn_purple" onclick="postLostFlirt(); return false;">Submit</button>
  99.         </td>
  100.     </tr>
  101. </table>
  102. </form>
  103. <?php else: ?>
  104.     <p>
  105.         &nbsp;&nbsp;&nbsp;<a href="<?php echo CRoute::_( 'index.php?option=com_community&view=register' , false ); ?>">Sign up</a> for an account and find your lost flirt! 
  106.     </p>
  107. <?php endif ?>
  108. <br/>
  109. <br/>
  110. <br/>
  111. </div>


We loop through all the flirts and output them, we render the pagination controls and finally we render the create form. Note all the tests for displaying various controls, tests that are also repeated in the controller.


Note also the minimal JavaScript validation we perform with the help of jQuery, simply to avoid empty, or near empty, values.




Related Posts



Tags: ,



Sunday, September 11, 2011

Backup Your MySQL Database Using PHP

http://davidwalsh.name/backup-mysql-database-php

Backup Your MySQL Database Using PHP

Create a MySQL Database With PHP - step by step - TUTORIAL - cool

Create a MySQL Database With PHP

http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/create-a-mysql-database-with-php.aspx

To create a database use the mysql_query() function to execute an SQL query like this

$query = "CREATE DATABASE phpcake";
$result = mysql_query($query);


include 'closedb.php';
?>

Please note that the query should not end with a semicolon.

PHP also provide a function to create MySQL database, mysql_create_db(). This function is deprecated though. It is better to use mysql_query() to execute an SQL CREATE DATABASE statement instead like the above example.

If you want to create MySQL database using PHP mysql_create_db() function you can do it like this :

mysql_create_db('phpcake');

include 'closedb.php';
?>

If you want to create tables in the database you just created don't forget to call mysql_select_db() to access the new database.

Note: some webhosts require you to create a MySQL database and user through your website control panel (such as CPanel). If you get an error when trying to create database this might be the case.

Creating the Tables

To create tables in the new database you need to do the same thing as creating the database. First create the SQL query to create the tables then execute the query using mysql_query() function.

Example : contact.php
Source code : contact.phps

$query = 'CREATE DATABASE phpcake';
$result = mysql_query($query);

mysql_select_db('phpcake') or die('Cannot select database');

$query = 'CREATE TABLE contact( '.
'cid INT NOT NULL AUTO_INCREMENT, '.
'cname VARCHAR(20) NOT NULL, '.
'cemail VARCHAR(50) NOT NULL, '.
'csubject VARCHAR(30) NOT NULL, '.
'cmessage TEXT NOT NULL, '.
'PRIMARY KEY(cid))';

$result = mysql_query($query);

include 'closedb.php';
?>

Of course when you need to create lots of tables it's a good idea to read the query from a file then save in $query variable instead of writing the query in your script.

$queryFile = 'myquery.txt';

$fp = fopen($queryFile, 'r');
$query = fread($fp, filesize($queryFile));
fclose($fp);
$result = mysql_query($query);

include 'closedb.php';
?>

Deleting a Database

As with creating a database, it is also preferable to use mysql_query() and to execute the SQL DROP DATABASE statement instead of using mysql_drop_db()

// ... do something here

$query = 'DROP DATABASE phpcake';
$result = mysql_query($query);

// ... probably do something here too

include 'closedb.php';
?>

After the database and the tables are ready it's time to put something into the database.