cvs: pearweb /public_html wishlist.php
| From: | Stig Bakken | Date: | Tue, 28 May 2002 01:49:22 +0000 |
| Subject: | cvs: pearweb /public_html wishlist.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4185@lists.php.net to get a copy of this message | ||
ssb Mon May 27 21:49:22 2002 EDT
Added files:
/pearweb/public_html wishlist.php
Log:
* wishlist redirector
Index: pearweb/public_html/wishlist.php
+++ pearweb/public_html/wishlist.php
<?php
if (empty($user)) {
$user = @$_GET['handle'];
}
if (empty($user)) {
$user = basename($_SERVER['PATH_INFO']);
}
PEAR::setErrorHandling(PEAR_ERROR_RETURN);
$url = $dbh->getOne('SELECT wishlist FROM users WHERE handle = ?',
array($user));
if (empty($url) || PEAR::isError($url)) {
header("HTTP/1.0 404 Not found");
die("<h1>User not found</h1>\n");
}
header("Location: $url");
print "<a href=\"$url\">click here to go to $_GET[handle]'s
wishlist</a>\n";
?>