Chapter 17: |
|
Database-driven pagesThis is yet another way to customize your visitor's experience. You might have a search form that they use to narrow down the options they want to see. You might have a cookie on their PC that lets you look up their past purchases. Or you could have any number of other things you can find in your database. Just design a page to display the results. Use your template to create the basic page. Then fill in the content area with an example of each type of thing you want displayed. It might be a product's picture, description price, availability and a link to your shopping cart to buy that item. Methods like these will streamine and personalize your shopper's experience. You don't have to be as big as Amazon.com to look and feel every bit as professional! |
|
Work on the page layout until you're happy with the way it looks. Then replace the specific items with variables and use the echo() function to display them on the page. When you write the call to the header() function, just include your data items in the query string and PHP will do the rest. Instant database-driven page generation! Here's an example of part of such a page. The code below was designed using fixed values for each of the items to be displayed in the table. <table> The search function pulled out the desired information from the database. It passed the data to a loop that created a table like this for each row that matched the search terms. The loop was controlled by the number of results found in the database. There was only one actual copy of the table itself, but it contained a variable for each item of information. Where a price had to be displayed, there was a "\$" in front of the variable name so the "dollar sign" would be visible.
Cloaking affiliate linksI hope I don't have to explain why you should use some form of cloaking for any affiliate links you promote. There are several reasons - and they are all very sound. My job here is simply to show you an easy way to do it. Wanna see? Let's suppose you have this link to promote ClickBank Automator: http://themarketingwizards.com/a.cgi?i=merrymonk&p=1 Start a PHP file and put this in it: <?php Name it cb_automator.php or some such thing. Now upload it to your web server. Anywhere you want to show someone a link to the sales page for ClickBank Automator - on your site, in emails, linked to a graphic, etc.) just use this as the link or link reference: http://www.yoursite.com/cb_automator.php Can you see what is happening here? When someone clicks the link - or some "anchor" such as ClickBank Automator, your tiny little PHP script is what actually runs. It loads the page specified in the call to the header() function. It's brain-dead simple but blazingly fast. How long this trick will fool search engines is anybody's guess. Still, you can use it to prevent commission hijacking and a few other nasty
little problems we marketers often face. If it saves you the loss of commission on a $47 product
a couple of times, this tip alone was worth what you paid for this ebook!
Custom pagesThis is just an extension of the idea of dynamic pages. Perhaps you're running a contest on your site. You can have a page display the status of the contest, who's currently ahead (if it's a competitive contest) or simply be updated whenever a small text file is changed. This file could have the description of the current prize(s), new Terms and Conditions or anything else you want to update. Maybe you have a searchable database. A custom page could display the results of a query sent to the database. Maybe you have an affiliate program or a members-only area on your site. A custom page could be used to grant people access to the private area. It could assign them a username and password (either generated by some random process or entered by the user). It could say that the user's login info has been emailed to the user and advise them what to do in case they didn't receive it. Custom pages could be used to provide updated pricing, delivery and availability info if you sell tangible products. A database could have all the info and the custom page could simply respond to a user's query with the info they want at that moment. It could provide contact info in case they have questions not answered by the database. Use your imagination! The Web can be impersonal; make the user's experience feel more personalized and they'll be back to do business with you again. |
| Previous Page Table of Contents Next Page |
Copyright © 2004 Steve Humphrey |