You are here: Re: Creating Dynamic URLs « PHP Programming Language « IT news, forums, messages
Re: Creating Dynamic URLs

Posted by Pedro Graca on 10/08/06 20:17

jflash top-posted:
> OK, I am now fairly thoroughly confused. What I am asking is for a way
> to have a page which can display information from a database filtered
> and/or sorted based on arguments supplied by the user in the URL. I
> wish I could explain it better, but that's the best way I know how.
> Anything else that I need to know, I suppose I can figure out later.
> Right now, I'm just trying to get the sorting/filtering down.

Can you make a page that displays "Hello, <USER>!" when <USER> comes
from the query string?

Suppose I go to http://www.yourserver.com/hello.php?user=Pedro
The "hello.php" script would be something like

<?php
if ((isset($_GET['user'])) && ($_GET['user'] != '')) {
echo "Hello, {$_GET['user']}!";
} else {
echo "Hello, anonymous!";
}
?>

It's just about the same thing when you want to use data from the query
string for database selection/sort. You just need to get the data and
incorporate it in the SQL commands (*after validating the data*).

--
File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot

 

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

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