note 27713 added to function.fdf-set-javascript-action
| From: | Shawn at we dot bs | Date: | Mon, 16 Dec 2002 19:32:33 +0000 |
| Subject: | note 27713 added to function.fdf-set-javascript-action | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40977@lists.php.net to get a copy of this message | ||
Here is another way: (warning: Coded by Newbie - YMMV)
I was using this in a scenario where I sent out personalized invitations to people (they contained
personalized URLs). This way, when they clicked on the link (in E-mail case), or entered it in (in
hard copy case), they would have a "fully customized" site that I only had to build once!
Well - I thought it was cool anyway :)
The Javascript was there as a bit of a Fail-safe. E-mail me if you have any questions about it.
Shawn@we.bs
----------------------------
$FullName=UCwords(strtolower(URLDECODE($QUERY_STRING)));
$NameSplit=explode(" ", $FullName);
$first = $NameSplit[0];
$last = end($NameSplit);
if ($FullName =="")
{
echo "
<SCRIPT LANGUAGE=\"JavaScript\">
<!--
var user_name = prompt(\"What is your name?\", \"\");
window.location=\"http://www.yoursitehere.com/user.php3?\"+
user_name;
//-->
</SCRIPT>
--
http://www.php.net/manual/en/function.fdf-set-javascript-action.php
http://master.php.net/manage/user-notes.php?action=edit+27713
http://master.php.net/manage/user-notes.php?action=delete+27713
http://master.php.net/manage/user-notes.php?action=reject+27713