Articles > PHP

PHP Ad Tracker: Entering Ad Banner and Client Data

In our last session, we showed how to list the ad banner data and client data.  In this session, we will examine the form that allows administrators to enter ad banner data. First, we include the class_ads.php file and instantiate the ads class: <?php require_once("class.ads.php"); // instantiate ads class $oAds = new ads; Next, we assign a value for the $id variable by suing the setID function in the ads class: // check for id if ($id) { // assign unique id $oAds->setId($id); } If the form has posted...

PHP Ad Tracker: Site Administration Ad Banner Data Form

If you have read any of the other posts in this series you know that we have done quite a bit with our PHP ad tracker. In this session, we will look at the HTML form that calls these actions. First, we create the HTML table that will hold the form header: <table border="0" cellpadding="0" cellspacing="0"> <tr> <td><b>Developer Drive Advertisements Administration</b></td> </tr> Next, we specify the operation (add/edit/delete/deactivate) for this...

PHP Ad Tracker: Listing Ad Banners and Clients

In our last session, we finished writing the PHP class file that would control all the ad banner functions.  This week, we look at the presentation layer for the administration of these functions. The ads_list.php page lists the current banner ads.  First, we must include the class file so that the page can instantiate the class call the functions: <?php require_once("class.ads.php"); // instantiate ads class $oAds = new ads; Next, we fill the $aAds array with the data from the ads table and get...
CSS

Parallax Scrolling: An Introduction

Anyone who has played, watched friends play, or briefly saw video games that were released in the 80’s and 90’s is familiar with parallax scrolling. Think of games like Mario Bros, Streets of Rage, Kung Fu, Turtles in Time, or the original parallax scrolling game, Moon Patrol.  Parallax scrolling is when there are multiple layers of images all moving at different speeds, causing a 2D image to have a 3D-like effect. Why am I talking about retro video games on a web development site?  Well, the simple...

PHP Ad Tracker Part III: Data Object Coding

In last week’s lesson, we looked at the variables and methods we would need to interact with the advertising database tables. This week, we’ll examine the code for the data object class file and how the other parts of the site will use these methods. First, we include the database connection string information.  This information includes the database server name, cursor location and other pertinent information. Since this information is used throughout the site, it is usually stored in a separate...
CSS

Developing a Responsive Website Part 4: Finishing The Homepage Portfolio Slider

This week we're going to finish up the portfolio slider on our homepage that we have already started. At this point, if you view your index.php file and scroll down to the secondary screen it should look something like this. We’re close, all we have to do now is plug in our jQuery elements and then add some CSS to make our secondary portfolio slider screen responsive. Go ahead and download the Java files you'll need from here, keep the js directory in your root folder and check out what out the image below...

Pushing Updates to the Web Page with HTML5 Server-Sent Events

The HTML5 Server-Sent event model allows you to push realtime data updates from the server to the browser. In this tutorial we will work through the process, with the EventSource object handling received data and writing it to the page. We will use HTML5 and JavaScript at client side, with PHP at server side. With existing models such as AJAX, the code in a Web page would continually ask the server to supply new data, but the onus was on the client to request the information. With Server-Sent requests, you...

Embed Analytics Using the Google Analtyics API

Google Analtyics gives so much data that sometimes it becomes hard to digest. For larger sites it is easy to become so overwhelmed that you can't find the time to look up the analtyics for each page. Or maybe you have many editors for a site who don't have access to your Google Analtyics account and you want to provide them with data so they can see how well their pages are performing. With the Google Analytics API we can easily display some basic analytics right in each page.  Google offers many libraries...
Load more
Home CSS Deals DesignBombs HTML HTML5 JavaScript jQuery Miscellaneous Mobile MySQL News PHP Resources Security Snippet Tools Tutorial Web Development Web Services WordPress