How do I create a "personalized" web page that reads parameters?

Hi,

Let’s say I want to create a web page that says, “Hello _____ congratulations on ______”.

But instead of the underlines, I want to display parameters that I would pass in the URL, so the web page would say (for example) “Hello Julie, congratulations on your 50th birthday”. I’d build the URL as part of a personalized email that I’d send out. I use Dreamweaver as an HTML authoring tool, and I have a server that runs PHP.

Any ideas?

And in case anyone snarky asks, no this isn’t homework. I’ve been out of college for almost two decades.

Thanks.

Well, for the purposes you mention (just passing variables in, not setting up an input form, etc.), this example written in PHP will work:



<?php 
// example: http://www.yoursite.com/page.php?name=Bob&congrats=everything 

$username = $_GET['name']; 
$thing = $_GET['congrats'];
echo "Hello $username congratulations on $thing";

?> 


Of course, you would do well to snaz it up a bit to suit your needs, but I hope this example gives you an idea of where to begin. :slight_smile:

That’s perfect atomicbadgerrace - I tried it out and that’s exactly what I needed. Thanks a lot!

Bob has been busy.

Ummm, I’m not sure what that means. Is that a reference to something?

Scratch that - I get it now - “Bob, congratulations on everything” equals “Bob has been busy”. Makes sense. Carry on.