You are here: Re: Help PHP Question « PHP Programming Language « IT news, forums, messages
Re: Help PHP Question

Posted by Berimor on 11/03/05 10:55

On Thu, 03 Nov 2005 08:29:38 +0200, <eli.hen@gmail.com> wrote:

> Using $_GET :
>
> result.php?num=1001
>
> Then use $_GET['num'] to get the number 1001.


or you can use Apache's the mod_rewrite:

RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^result\.php\?([\d]+)$ /?num=$1

(if result.php is in site's root directory)

this should rewrite request result.php?1001 to result.php?num=1001
you can use even better view construction with mod_rewrite:
RewriteRule ^result\/([\d]+)$ /result.php?num=$1

will rewrite http://mysite.com/result/1001 to
http://mysite.com/result.php?num=1001

>
>
> Using $_SERVER['QUERY_STRING'] :
>
> result.php?1001
>
> Then use $_SERVER['QUERY_STRING'] to get all the string after the ?
> mark. In this case it will have the number 1001.
>



--
---
Exact Meta Search | Major Search Engine
http://exactsearcher.com

 

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

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