You are here: Re: URL Rewriting « PHP Programming Language « IT news, forums, messages
Re: URL Rewriting

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация