Personalizing pages I've found to be very powerful. "Hey Austin!" is more effective than "Hey You!", I think it's just because our name naturally stands out to us.


This can be really useful in emails you mail out to your list ... you can have them click a link that brings up a page customized with their name.

Here's an example of what the code below will do for you (with my name in there):

Problem is (well, I guess this is a good thing for you) no one really does it even though it's dead simple.

First, name the page mypage.php rather than mypage.html.

Next, when you send out an email linking to your page (assuming you're using some auto-responder), link to{!firstname} -- where I have {!firstname} you would put whatever code your auto-responder uses for the name.

In your page where you want the name to show up put

<?php if(isset($_GET['name']) && strlen($_GET['name']) > 0) $name = ucfirst($_GET['name']); else $name = "You"; echo $name; ?>

This will grab their name if it's in the URL, capitalize the first letter of it (ie. austin turns to Austin) and output it. If their name isn't in the URL, it will output "You" instead. If you want it to say something other than "You" just change what's in the quotes there.

If you want it to show something other than "name" in the URL, for example you want it to look like: mypage.php?awesomeperson=austin just change all references of "name" in the above code to "awesomeperson".

To get a bit advanced and have the URL look prettier like you'll want to edit the .htaccess file in the folder your file is in. If you already have a .htaccess file in that folder just open it up and edit it in whichever editor you use. Otherwise, create one -- it's just named .htaccess nothing else tacked on.

At the top of your .htaccess file you'll need to put

RewriteEngine on
RewriteRule ^mypage(/|$)([^/\.]*)/?$ mypage.php?name=$2 [L]

Of course replacing "mypage" and "mypage.php" with the folder you want it to appear like it's in, and the file name.

For example if you want to show up as, you would change the first "mypage" to "splash", "mypage.php" to "splash1.php" and "name" to "awesome". You'd end up with something like this:

RewriteEngine on
RewriteRule ^splash(/|$)([^/\.]*)/?$ splash1.php?awesome=$2 [L]

Hope this helps, and as always if you have any questions post them in the comments!