Posted by Ja NE on 11/14/05 03:55
Bill Karwin <bill@karwin.com> wrote:
> for a couple of minutes but I didn't see a concise alternative proposed
> for PHP applications to do this in script code.
>
I'm not an expert, but when I wanted to give my users short uri instead
of domain.name.tld/index.php?pages=user&id=007 I made:
$person = $_GET['nick'];
if(isset($person)) {
$query = "SELECT id FROM table WHERE nick='$person'";
$result = mysql_query ($query) or die ("$query");
list($id) = mysql_fetch_array($result);
header("Location: index.php?pages=user&id=$id");
}
so users personal uri is like domain.name.tld/?nick=bond
if I need or want, I can change new location to anything more complex
(nothing cames to my mind right now)
--
Ja NE
http://fotozine.org/?omen=janimir
--
Navigation:
[Reply to this message]
|