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

**URL:** <https://boards.straightdope.com/t/how-do-i-create-a-personalized-web-page-that-reads-parameters/443260>\
**Category:** Factual Questions\
**Created:** [March 30, 2008, 8:38am UTC](https://boards.straightdope.com/t/how-do-i-create-a-personalized-web-page-that-reads-parameters/443260 "2008-03-30T08:38:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaelghat](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@aaelghat](https://boards.straightdope.com/u/aaelghat)\
**Post date:** [March 30, 2008, 8:38am UTC](https://boards.straightdope.com/t/how-do-i-create-a-personalized-web-page-that-reads-parameters/443260/1 "2008-03-30T08:38:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![atomicbadgerrace](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@atomicbadgerrace](https://boards.straightdope.com/u/atomicbadgerrace)\
**Post date:** [March 30, 2008, 8:47am UTC](https://boards.straightdope.com/t/how-do-i-create-a-personalized-web-page-that-reads-parameters/443260/2 "2008-03-30T08:47:20Z")

</div>

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

```auto

<?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. 🙂

---

<div class="post-metadata">

**Author:** ![aaelghat](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@aaelghat](https://boards.straightdope.com/u/aaelghat)\
**Post date:** [March 30, 2008, 10:02pm UTC](https://boards.straightdope.com/t/how-do-i-create-a-personalized-web-page-that-reads-parameters/443260/3 "2008-03-30T22:02:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Lobsang](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lobsang/32/4067_2.png) [@Lobsang](https://boards.straightdope.com/u/Lobsang)\
**Post date:** [March 30, 2008, 10:06pm UTC](https://boards.straightdope.com/t/how-do-i-create-a-personalized-web-page-that-reads-parameters/443260/4 "2008-03-30T22:06:53Z")

</div>

Bob has been busy.

---

<div class="post-metadata">

**Author:** ![aaelghat](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@aaelghat](https://boards.straightdope.com/u/aaelghat)\
**Post date:** [March 30, 2008, 11:13pm UTC](https://boards.straightdope.com/t/how-do-i-create-a-personalized-web-page-that-reads-parameters/443260/5 "2008-03-30T23:13:12Z")

</div>

[QUOTE=Lobsang]  
Bob has been busy.  
[/QUOTE]

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

---

<div class="post-metadata">

**Author:** ![aaelghat](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@aaelghat](https://boards.straightdope.com/u/aaelghat)\
**Post date:** [March 30, 2008, 11:16pm UTC](https://boards.straightdope.com/t/how-do-i-create-a-personalized-web-page-that-reads-parameters/443260/6 "2008-03-30T23:16:19Z")

</div>

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